add examples
Browse files- app.py +6 -1
- src/data/stubs/bird.jpg +0 -0
- src/data/stubs/car.jpeg +0 -0
- src/data/stubs/lady.jpg +0 -0
- src/data/stubs/pigeon.jpg +0 -0
- src/data/stubs/rohit.jpeg +0 -0
app.py
CHANGED
|
@@ -112,6 +112,11 @@ def change_image_with_text(image: Image, text: str, model_name: str) -> Image:
|
|
| 112 |
demo = gr.Interface(
|
| 113 |
fn=change_image_with_text,
|
| 114 |
inputs=[gr.Image(type="pil"), "text", gr.inputs.Dropdown(list(models.keys()))],
|
| 115 |
-
outputs=gr.Image(type="pil")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
)
|
| 117 |
demo.launch(debug=True)
|
|
|
|
| 112 |
demo = gr.Interface(
|
| 113 |
fn=change_image_with_text,
|
| 114 |
inputs=[gr.Image(type="pil"), "text", gr.inputs.Dropdown(list(models.keys()))],
|
| 115 |
+
outputs=gr.Image(type="pil"),
|
| 116 |
+
examples=[
|
| 117 |
+
["src/data/stubs/car.jpeg", "black car on the green road", "COCO"],
|
| 118 |
+
["src/data/stubs/lady.jpg", "lady with blue eyes", "UTKFace"],
|
| 119 |
+
["src/data/stubs/bird.jpg", "white bird with black wings", "Bird"]
|
| 120 |
+
]
|
| 121 |
)
|
| 122 |
demo.launch(debug=True)
|
src/data/stubs/bird.jpg
CHANGED
|
|
src/data/stubs/car.jpeg
ADDED
|
src/data/stubs/lady.jpg
ADDED
|
src/data/stubs/pigeon.jpg
DELETED
|
Binary file (578 kB)
|
|
|
src/data/stubs/rohit.jpeg
DELETED
|
Binary file (130 kB)
|
|
|