Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -194,12 +194,8 @@ def gradio_predict(video,image, question):
|
|
| 194 |
|
| 195 |
|
| 196 |
def convert_and_save(data):
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
# Convert the DataFrame to a CSV string
|
| 200 |
-
csv_string = df.to_csv(index=False)
|
| 201 |
-
# Return a tuple with the filename and the CSV string
|
| 202 |
-
return ("annotations.csv", csv_string)
|
| 203 |
|
| 204 |
css = """
|
| 205 |
#container{
|
|
@@ -243,7 +239,7 @@ with gr.Blocks(css = css) as app:
|
|
| 243 |
btn.click(gradio_predict, inputs=[video,image, question], outputs=answer)
|
| 244 |
|
| 245 |
# Button to save the answer as CSV
|
| 246 |
-
save_btn.click(
|
| 247 |
|
| 248 |
|
| 249 |
gr.Examples(
|
|
|
|
| 194 |
|
| 195 |
|
| 196 |
def convert_and_save(data):
|
| 197 |
+
|
| 198 |
+
return data
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
css = """
|
| 201 |
#container{
|
|
|
|
| 239 |
btn.click(gradio_predict, inputs=[video,image, question], outputs=answer)
|
| 240 |
|
| 241 |
# Button to save the answer as CSV
|
| 242 |
+
save_btn.click(convert_and_save, inputs=answer, outputs=download_link)
|
| 243 |
|
| 244 |
|
| 245 |
gr.Examples(
|