Ajaykanth Maddi commited on
Commit ·
53f4e1e
1
Parent(s): ae3baa3
Export Button UI Changes
Browse files
app.py
CHANGED
|
@@ -397,15 +397,17 @@ with gr.Blocks(
|
|
| 397 |
outputs=[gen_ans_display, y_pred_metrics_display, chunks_retrieved_display, evaluator_json_output]
|
| 398 |
)
|
| 399 |
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
|
|
|
|
|
|
| 409 |
|
| 410 |
# export_btn = gr.Button("💾 Export Locally", variant="primary")
|
| 411 |
# download_output = gr.File(label="Download File", visible=False)
|
|
|
|
| 397 |
outputs=[gen_ans_display, y_pred_metrics_display, chunks_retrieved_display, evaluator_json_output]
|
| 398 |
)
|
| 399 |
|
| 400 |
+
with gr.Row():
|
| 401 |
+
with gr.Column(scale=2):
|
| 402 |
+
# Add export button
|
| 403 |
+
# gr.Interface(fn=generate_file, inputs=orig_ans_display, outputs="file")
|
| 404 |
+
generate_btn = gr.Button("Generate & Download")
|
| 405 |
+
download_file = gr.File(label="Download Link")
|
| 406 |
+
generate_btn.click(
|
| 407 |
+
fn=generate_file,
|
| 408 |
+
inputs=gen_ans_display,
|
| 409 |
+
outputs=download_file
|
| 410 |
+
)
|
| 411 |
|
| 412 |
# export_btn = gr.Button("💾 Export Locally", variant="primary")
|
| 413 |
# download_output = gr.File(label="Download File", visible=False)
|