Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -122,7 +122,7 @@ with gr.Blocks() as demo:
|
|
122 |
|
123 |
accuracy_button = gr.Button("Calculate Accuracy")
|
124 |
# csv = gr.File(visible=False)
|
125 |
-
|
126 |
num_posts = gr.Number(visible=False)
|
127 |
data = gr.DataFrame(visible=False)
|
128 |
data_eval = gr.DataFrame()
|
@@ -134,7 +134,7 @@ with gr.Blocks() as demo:
|
|
134 |
accuracy_button.click(
|
135 |
calculate_accuracy,
|
136 |
inputs=[flood_checkbox_output, fire_checkbox_output, none_checkbox_output, num_posts, text_field, data],
|
137 |
-
outputs=[incorrect, correct, accuracy, data_eval,
|
138 |
|
139 |
with gr.Tab("Question Answering"):
|
140 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
|
|
122 |
|
123 |
accuracy_button = gr.Button("Calculate Accuracy")
|
124 |
# csv = gr.File(visible=False)
|
125 |
+
download_csv = gr.DownloadButton(visible=False)
|
126 |
num_posts = gr.Number(visible=False)
|
127 |
data = gr.DataFrame(visible=False)
|
128 |
data_eval = gr.DataFrame()
|
|
|
134 |
accuracy_button.click(
|
135 |
calculate_accuracy,
|
136 |
inputs=[flood_checkbox_output, fire_checkbox_output, none_checkbox_output, num_posts, text_field, data],
|
137 |
+
outputs=[incorrect, correct, accuracy, data_eval, download_csv])
|
138 |
|
139 |
with gr.Tab("Question Answering"):
|
140 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|