Spaces:
Running
on
Zero
Running
on
Zero
add examples
Browse files
app.py
CHANGED
|
@@ -81,10 +81,9 @@ with demo_blocks as demo:
|
|
| 81 |
seed = gr.Number(value=0, minimum=0, step=1, label="Inpaint seed")
|
| 82 |
models = ["black-forest-labs/FLUX.1-schnell"]
|
| 83 |
inpaint_model = gr.Dropdown(label="modes", choices=models, value="black-forest-labs/FLUX.1-schnell")
|
| 84 |
-
|
| 85 |
|
| 86 |
with gr.Column():
|
| 87 |
-
id_input=gr.Text(label="Name", visible=False)
|
| 88 |
image_out = gr.Image(height=800,sources=[],label="Output", elem_id="output-img",format="jpeg")
|
| 89 |
|
| 90 |
|
|
@@ -92,7 +91,12 @@ with demo_blocks as demo:
|
|
| 92 |
|
| 93 |
btn.click(fn=process_images, inputs=[image, image_mask,prompt,inpaint_model,strength,seed], outputs =image_out, api_name='infer')
|
| 94 |
gr.Examples(
|
| 95 |
-
examples=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
,
|
| 97 |
fn=example_out,
|
| 98 |
inputs=[image,image_mask,prompt,strength,id_input],
|
|
|
|
| 81 |
seed = gr.Number(value=0, minimum=0, step=1, label="Inpaint seed")
|
| 82 |
models = ["black-forest-labs/FLUX.1-schnell"]
|
| 83 |
inpaint_model = gr.Dropdown(label="modes", choices=models, value="black-forest-labs/FLUX.1-schnell")
|
| 84 |
+
id_input=gr.Text(label="Name", visible=False)
|
| 85 |
|
| 86 |
with gr.Column():
|
|
|
|
| 87 |
image_out = gr.Image(height=800,sources=[],label="Output", elem_id="output-img",format="jpeg")
|
| 88 |
|
| 89 |
|
|
|
|
| 91 |
|
| 92 |
btn.click(fn=process_images, inputs=[image, image_mask,prompt,inpaint_model,strength,seed], outputs =image_out, api_name='infer')
|
| 93 |
gr.Examples(
|
| 94 |
+
examples=[
|
| 95 |
+
["images/00547245_99.jpg", "images/00547245_99_mask.jpg","a beautiful girl,eyes closed",0.8,"00547245"],
|
| 96 |
+
["images/00538245_paint.jpg", "images/00538245_mask.jpg","a beautiful girl,wearing t-shirt",0.7,"00538245"],
|
| 97 |
+
["images/00207245_18.jpg", "images/00207245_18_mask.jpg","a beautiful girl,mouth opened",0.2,"00207245"]
|
| 98 |
+
|
| 99 |
+
]
|
| 100 |
,
|
| 101 |
fn=example_out,
|
| 102 |
inputs=[image,image_mask,prompt,strength,id_input],
|