Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,13 @@ def download_logs():
|
|
76 |
writer = csv.writer(output)
|
77 |
writer.writerows(prediction_log)
|
78 |
output.seek(0)
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
# Build the UI with Gradio Blocks
|
82 |
with gr.Blocks() as demo:
|
|
|
76 |
writer = csv.writer(output)
|
77 |
writer.writerows(prediction_log)
|
78 |
output.seek(0)
|
79 |
+
|
80 |
+
# Save as a temporary file for download
|
81 |
+
with open("prediction_logs.csv", "w", newline="") as f:
|
82 |
+
f.write(output.getvalue())
|
83 |
+
|
84 |
+
return "prediction_logs.csv"
|
85 |
+
|
86 |
|
87 |
# Build the UI with Gradio Blocks
|
88 |
with gr.Blocks() as demo:
|