Spaces:
Build error
Build error
Commit
·
b4a50a7
1
Parent(s):
5082b0f
try again
Browse files
app.py
CHANGED
@@ -137,14 +137,14 @@ def process_images_and_statements(image):
|
|
137 |
|
138 |
# Gradio interface
|
139 |
image_input = gr.inputs.Image()
|
140 |
-
output_df = gr.outputs.Dataframe(type="pandas", label="Results")
|
141 |
-
|
142 |
-
|
143 |
|
144 |
iface = gr.Interface(
|
145 |
fn=process_images_and_statements,
|
146 |
inputs=image_input,
|
147 |
-
outputs=[output_df, output_csv], #
|
148 |
title="Image Captioning and Image-Text Matching",
|
149 |
theme='sudeepshouche/minimalist',
|
150 |
css=".output { flex-direction: column; } .output .outputs { width: 100%; }" # Custom CSS
|
|
|
137 |
|
138 |
# Gradio interface
|
139 |
image_input = gr.inputs.Image()
|
140 |
+
output_df = gr.outputs.Dataframe(type="pandas", label="Results")
|
141 |
+
# Use the correct argument 'mime_type' and provide a string value for the MIME type
|
142 |
+
output_csv = gr.outputs.File(label="Download CSV", mime_type="text/csv", default="Results.csv", extension=".csv")
|
143 |
|
144 |
iface = gr.Interface(
|
145 |
fn=process_images_and_statements,
|
146 |
inputs=image_input,
|
147 |
+
outputs=[output_df, output_csv], # Include both the DataFrame and CSV file outputs
|
148 |
title="Image Captioning and Image-Text Matching",
|
149 |
theme='sudeepshouche/minimalist',
|
150 |
css=".output { flex-direction: column; } .output .outputs { width: 100%; }" # Custom CSS
|