Spaces:
Build error
Build error
Commit
·
1d153c2
1
Parent(s):
cb4c634
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,7 +96,6 @@ def process_images_and_statements(image_file):
|
|
| 96 |
|
| 97 |
# Define Gradio interface
|
| 98 |
image_input = gr.inputs.Image(type="numpy", label="Upload Image")
|
| 99 |
-
text_input = gr.inputs.Textbox(lines=5, label="Enter Statements (one per line)")
|
| 100 |
outputs = [
|
| 101 |
gr.outputs.Image(type="pil", label="Annotated Image"),
|
| 102 |
gr.outputs.Textbox(label="Matched Statements"),
|
|
@@ -104,11 +103,16 @@ outputs = [
|
|
| 104 |
|
| 105 |
iface = gr.Interface(
|
| 106 |
fn=process_images_and_statements,
|
| 107 |
-
inputs=
|
| 108 |
outputs=outputs,
|
| 109 |
title="Image Captioning and Matching",
|
| 110 |
-
description="Upload an image
|
|
|
|
| 111 |
)
|
| 112 |
|
| 113 |
# Launch Gradio app
|
| 114 |
iface.launch(debug=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
# Define Gradio interface
|
| 98 |
image_input = gr.inputs.Image(type="numpy", label="Upload Image")
|
|
|
|
| 99 |
outputs = [
|
| 100 |
gr.outputs.Image(type="pil", label="Annotated Image"),
|
| 101 |
gr.outputs.Textbox(label="Matched Statements"),
|
|
|
|
| 103 |
|
| 104 |
iface = gr.Interface(
|
| 105 |
fn=process_images_and_statements,
|
| 106 |
+
inputs=image_input,
|
| 107 |
outputs=outputs,
|
| 108 |
title="Image Captioning and Matching",
|
| 109 |
+
description="Upload an image to generate a caption for the image and match the statements.",
|
| 110 |
+
theme='sudeepshouche/minimalist'
|
| 111 |
)
|
| 112 |
|
| 113 |
# Launch Gradio app
|
| 114 |
iface.launch(debug=True)
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
# Launch Gradio app
|
| 118 |
+
iface.launch(debug=True)
|