Ajaykanth Maddi commited on
Commit ·
124750e
1
Parent(s): 920bfb0
Export Button UI Changes
Browse files
app.py
CHANGED
|
@@ -410,10 +410,10 @@ with gr.Blocks(
|
|
| 410 |
)
|
| 411 |
|
| 412 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
| 413 |
with gr.Column(scale=2):
|
| 414 |
-
# Add export button
|
| 415 |
-
# gr.Interface(fn=generate_file, inputs=orig_ans_display, outputs="file")
|
| 416 |
-
generate_btn = gr.Button("Generate JSON & Download")
|
| 417 |
json_output = gr.Code(label="JSON Output", language="json")
|
| 418 |
download_file = gr.File(label="Download Link")
|
| 419 |
generate_btn.click(
|
|
@@ -422,17 +422,5 @@ with gr.Blocks(
|
|
| 422 |
outputs=[json_output, download_file]
|
| 423 |
)
|
| 424 |
|
| 425 |
-
# export_btn = gr.Button("💾 Export Locally", variant="primary")
|
| 426 |
-
# download_output = gr.File(label="Download File", visible=False)
|
| 427 |
-
# export_btn.click(
|
| 428 |
-
# fn=export_data,
|
| 429 |
-
# inputs=[
|
| 430 |
-
# orig_ans_display,
|
| 431 |
-
# y_metrics_display,
|
| 432 |
-
# gen_ans_display,
|
| 433 |
-
# y_pred_metrics_display,
|
| 434 |
-
# ],
|
| 435 |
-
# outputs=download_output
|
| 436 |
-
# )
|
| 437 |
|
| 438 |
demo.launch(debug=True, prevent_thread_lock=True, share=True)
|
|
|
|
| 410 |
)
|
| 411 |
|
| 412 |
with gr.Row():
|
| 413 |
+
# Add export button
|
| 414 |
+
# gr.Interface(fn=generate_file, inputs=orig_ans_display, outputs="file")
|
| 415 |
+
generate_btn = gr.Button("Generate JSON & Download")
|
| 416 |
with gr.Column(scale=2):
|
|
|
|
|
|
|
|
|
|
| 417 |
json_output = gr.Code(label="JSON Output", language="json")
|
| 418 |
download_file = gr.File(label="Download Link")
|
| 419 |
generate_btn.click(
|
|
|
|
| 422 |
outputs=[json_output, download_file]
|
| 423 |
)
|
| 424 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 425 |
|
| 426 |
demo.launch(debug=True, prevent_thread_lock=True, share=True)
|