Spaces:
Running
on
Zero
Running
on
Zero
add example
Browse files- app.py +4 -3
- examples/00538245.jpg +0 -0
- examples/00538245_paint.jpg +0 -0
- examples/expand_mouth_mask.jpg +0 -0
- examples/{00538245_mask.jpg → normal_mouth_mask.jpg} +0 -0
app.py
CHANGED
|
@@ -90,7 +90,7 @@ def process_images(image, image2=None,prompt="a girl",inpaint_model="black-fores
|
|
| 90 |
|
| 91 |
return output.images[0],mask_image
|
| 92 |
|
| 93 |
-
|
| 94 |
output,mask_image = process_inpaint(image["background"],mask,prompt,inpaint_model,strength,seed)
|
| 95 |
|
| 96 |
return output,mask_image
|
|
@@ -161,8 +161,9 @@ with gr.Blocks(css=css, elem_id="demo-container") as demo:
|
|
| 161 |
btn.click(fn=process_images, inputs=[image, image_mask,prompt,inpaint_model,strength,seed], outputs =[image_out,mask_out], api_name='infer')
|
| 162 |
gr.Examples(
|
| 163 |
examples=[
|
| 164 |
-
["examples/00547245_99.jpg", "examples/00547245_99_mask.jpg","a beautiful girl,eyes closed",0.
|
| 165 |
-
["examples/
|
|
|
|
| 166 |
["examples/00207245_18.jpg", "examples/00207245_18_mask.jpg","a beautiful girl,mouth opened",0.2,"examples/00207245.jpg"]
|
| 167 |
]
|
| 168 |
,
|
|
|
|
| 90 |
|
| 91 |
return output.images[0],mask_image
|
| 92 |
|
| 93 |
+
print(image["background"].mode)
|
| 94 |
output,mask_image = process_inpaint(image["background"],mask,prompt,inpaint_model,strength,seed)
|
| 95 |
|
| 96 |
return output,mask_image
|
|
|
|
| 161 |
btn.click(fn=process_images, inputs=[image, image_mask,prompt,inpaint_model,strength,seed], outputs =[image_out,mask_out], api_name='infer')
|
| 162 |
gr.Examples(
|
| 163 |
examples=[
|
| 164 |
+
["examples/00547245_99.jpg", "examples/00547245_99_mask.jpg","a beautiful girl,eyes closed",0.75,"examples/00547245.jpg"],
|
| 165 |
+
["examples/00538245.jpg", "examples/normal_mouth_mask.jpg","a beautiful girl,big-smile",0.75,"examples/00538245.jpg"],
|
| 166 |
+
["examples/00538245.jpg", "examples/expand_mouth_mask.jpg","a beautiful girl,big-smile",0.75,"examples/00538245.jpg"],
|
| 167 |
["examples/00207245_18.jpg", "examples/00207245_18_mask.jpg","a beautiful girl,mouth opened",0.2,"examples/00207245.jpg"]
|
| 168 |
]
|
| 169 |
,
|
examples/00538245.jpg
CHANGED
|
|
examples/00538245_paint.jpg
DELETED
|
Binary file (146 kB)
|
|
|
examples/expand_mouth_mask.jpg
ADDED
|
examples/{00538245_mask.jpg → normal_mouth_mask.jpg}
RENAMED
|
File without changes
|