Spaces:
Sleeping
Sleeping
Add export buttons for batch results in the file upload interface
Browse files
src/interface/file_upload_interface.py
CHANGED
|
@@ -816,6 +816,25 @@ def create_file_upload_interface() -> gr.Blocks:
|
|
| 816 |
|
| 817 |
# Visual progress bar (updates during batch classification)
|
| 818 |
batch_progress_bar = gr.Progress()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 819 |
|
| 820 |
# Message processing section (initially hidden)
|
| 821 |
message_processing_section = gr.Row(visible=False)
|
|
@@ -890,24 +909,8 @@ def create_file_upload_interface() -> gr.Blocks:
|
|
| 890 |
label="Statistics"
|
| 891 |
)
|
| 892 |
|
| 893 |
-
# Export options
|
| 894 |
gr.Markdown("### 💾 Export Results")
|
| 895 |
-
|
| 896 |
-
export_csv_btn = gr.DownloadButton(
|
| 897 |
-
label="Download CSV",
|
| 898 |
-
variant="secondary",
|
| 899 |
-
visible=False,
|
| 900 |
-
)
|
| 901 |
-
export_json_btn = gr.DownloadButton(
|
| 902 |
-
label="Download JSON",
|
| 903 |
-
variant="secondary",
|
| 904 |
-
visible=False,
|
| 905 |
-
)
|
| 906 |
-
export_xlsx_btn = gr.DownloadButton(
|
| 907 |
-
label="Download XLSX",
|
| 908 |
-
variant="secondary",
|
| 909 |
-
visible=False,
|
| 910 |
-
)
|
| 911 |
|
| 912 |
# Status messages
|
| 913 |
status_message = gr.Markdown("", visible=True)
|
|
|
|
| 816 |
|
| 817 |
# Visual progress bar (updates during batch classification)
|
| 818 |
batch_progress_bar = gr.Progress()
|
| 819 |
+
|
| 820 |
+
# Export results (visible after batch completes)
|
| 821 |
+
gr.Markdown("### 💾 Download Results")
|
| 822 |
+
with gr.Row():
|
| 823 |
+
export_csv_btn = gr.DownloadButton(
|
| 824 |
+
label="Download CSV",
|
| 825 |
+
variant="secondary",
|
| 826 |
+
visible=False,
|
| 827 |
+
)
|
| 828 |
+
export_json_btn = gr.DownloadButton(
|
| 829 |
+
label="Download JSON",
|
| 830 |
+
variant="secondary",
|
| 831 |
+
visible=False,
|
| 832 |
+
)
|
| 833 |
+
export_xlsx_btn = gr.DownloadButton(
|
| 834 |
+
label="Download XLSX",
|
| 835 |
+
variant="secondary",
|
| 836 |
+
visible=False,
|
| 837 |
+
)
|
| 838 |
|
| 839 |
# Message processing section (initially hidden)
|
| 840 |
message_processing_section = gr.Row(visible=False)
|
|
|
|
| 909 |
label="Statistics"
|
| 910 |
)
|
| 911 |
|
|
|
|
| 912 |
gr.Markdown("### 💾 Export Results")
|
| 913 |
+
gr.Markdown("Download buttons appear in the 'Batch Processing' section after completion.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 914 |
|
| 915 |
# Status messages
|
| 916 |
status_message = gr.Markdown("", visible=True)
|