Spaces:
Runtime error
Runtime error
Commit
·
ac04e7e
1
Parent(s):
fe691aa
Add examples
Browse files
app.py
CHANGED
@@ -157,5 +157,16 @@ Upload an image to edit it. You can try `Fast mode` with prompts, or `Quality mo
|
|
157 |
|
158 |
btn_edit_fast.click(fn=run_editing, inputs=[image, original_prompt, edit_prompt], outputs=[image_output])
|
159 |
btn_edit_quality.click(fn=run_editing_quality, inputs=[image, item_from, item_from_other, item_to, item_to_other], outputs=[image_output])
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
demo.launch()
|
|
|
157 |
|
158 |
btn_edit_fast.click(fn=run_editing, inputs=[image, original_prompt, edit_prompt], outputs=[image_output])
|
159 |
btn_edit_quality.click(fn=run_editing_quality, inputs=[image, item_from, item_from_other, item_to, item_to_other], outputs=[image_output])
|
160 |
+
gr.Examples(
|
161 |
+
examples=[
|
162 |
+
[os.path.join(os.path.dirname(__file__), "assets/test_images/cats/cat_1.png"), "cat", "", "dog", ""],
|
163 |
+
[os.path.join(os.path.dirname(__file__), "assets/test_images/cats/cat_2.png"), "cat", "", "horse", ""],
|
164 |
+
[os.path.join(os.path.dirname(__file__), "assets/test_images/dogs/dog_1.png"), "dog", "", "horse", ""],
|
165 |
+
[os.path.join(os.path.dirname(__file__), "assets/test_images/dogs/dog_2.png"), "dog", "", "zebra", ""],
|
166 |
+
],
|
167 |
+
inputs=[image, item_from, item_from_other, item_to, item_to_other],
|
168 |
+
outputs=image_output,
|
169 |
+
fn=run_editing_quality,
|
170 |
+
cache_examples=True,
|
171 |
+
)
|
172 |
demo.launch()
|