Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,13 +192,9 @@ def gradio_predict(video,image, question):
|
|
| 192 |
# Convert the dictionary to a DataFrame
|
| 193 |
df = pd.DataFrame([answer])
|
| 194 |
|
| 195 |
-
# Convert the DataFrame to CSV
|
| 196 |
-
output_buffer = BytesIO()
|
| 197 |
-
df.to_csv(answer, index=False)
|
| 198 |
-
output_buffer.seek(0)
|
| 199 |
|
| 200 |
|
| 201 |
-
return answer,
|
| 202 |
|
| 203 |
css = """
|
| 204 |
#container{
|
|
@@ -233,7 +229,7 @@ with gr.Blocks(css = css) as app:
|
|
| 233 |
btn = gr.Button("Annotate")
|
| 234 |
with gr.Column():
|
| 235 |
answer = gr.TextArea(label="Answer")
|
| 236 |
-
|
| 237 |
|
| 238 |
|
| 239 |
btn.click(gradio_predict, inputs=[video,image, question], outputs=answer)
|
|
|
|
| 192 |
# Convert the dictionary to a DataFrame
|
| 193 |
df = pd.DataFrame([answer])
|
| 194 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
|
| 196 |
|
| 197 |
+
return answer, df
|
| 198 |
|
| 199 |
css = """
|
| 200 |
#container{
|
|
|
|
| 229 |
btn = gr.Button("Annotate")
|
| 230 |
with gr.Column():
|
| 231 |
answer = gr.TextArea(label="Answer")
|
| 232 |
+
csv = gr.Dataframe(label="CSV")
|
| 233 |
|
| 234 |
|
| 235 |
btn.click(gradio_predict, inputs=[video,image, question], outputs=answer)
|