Update app.py
Browse files
app.py
CHANGED
|
@@ -387,22 +387,14 @@ def create_interface():
|
|
| 387 |
show_label=False,
|
| 388 |
elem_id="icon"
|
| 389 |
)
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
pass
|
| 393 |
gr.Markdown(
|
| 394 |
"This project offers a tool that identifies surprising elements in images, "
|
| 395 |
"pinpointing what violates our expectations. It analyzes images for unexpected objects, "
|
| 396 |
"locations, social scenarios, settings, and roles."
|
| 397 |
)
|
| 398 |
-
|
| 399 |
-
# Display example images in a row using Gradio Image components
|
| 400 |
-
with gr.Row():
|
| 401 |
-
gr.Image(value="appendix/gradio_example.png", width=250, show_label=False, interactive=False)
|
| 402 |
-
gr.Image(value="appendix/gradio_example2.png", width=250, show_label=False, interactive=False)
|
| 403 |
-
gr.Image(value="appendix/gradio_example3.png", width=250, show_label=False, interactive=False)
|
| 404 |
-
gr.Image(value="appendix/gradio_example4.png", width=250, show_label=False, interactive=False)
|
| 405 |
-
|
| 406 |
with gr.Row():
|
| 407 |
with gr.Column():
|
| 408 |
input_image = gr.Image(label="Upload Image")
|
|
@@ -418,6 +410,15 @@ def create_interface():
|
|
| 418 |
outputs=[output_image, output_text]
|
| 419 |
)
|
| 420 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
return demo
|
| 422 |
|
| 423 |
|
|
|
|
| 387 |
show_label=False,
|
| 388 |
elem_id="icon"
|
| 389 |
)
|
| 390 |
+
gr.Markdown("## Image Anomaly-Surprise Detection")
|
| 391 |
+
|
|
|
|
| 392 |
gr.Markdown(
|
| 393 |
"This project offers a tool that identifies surprising elements in images, "
|
| 394 |
"pinpointing what violates our expectations. It analyzes images for unexpected objects, "
|
| 395 |
"locations, social scenarios, settings, and roles."
|
| 396 |
)
|
| 397 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
with gr.Row():
|
| 399 |
with gr.Column():
|
| 400 |
input_image = gr.Image(label="Upload Image")
|
|
|
|
| 410 |
outputs=[output_image, output_text]
|
| 411 |
)
|
| 412 |
|
| 413 |
+
|
| 414 |
+
# Display example images in a row using Gradio Image components
|
| 415 |
+
with gr.Row():
|
| 416 |
+
gr.Image(value="appendix/gradio_example.png", width=250, show_label=False, interactive=False)
|
| 417 |
+
gr.Image(value="appendix/gradio_example2.png", width=250, show_label=False, interactive=False)
|
| 418 |
+
gr.Image(value="appendix/gradio_example3.png", width=250, show_label=False, interactive=False)
|
| 419 |
+
gr.Image(value="appendix/gradio_example4.png", width=250, show_label=False, interactive=False)
|
| 420 |
+
|
| 421 |
+
|
| 422 |
return demo
|
| 423 |
|
| 424 |
|