Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -108,10 +108,10 @@ with gr.Blocks() as demo:
|
|
| 108 |
incorrect = gr.Number(label="Number of incorrect classifications", value=0)
|
| 109 |
accuracy = gr.Number(label="Model Accuracy", value=0)
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
outputs=incorrect)
|
| 116 |
|
| 117 |
with gr.Tab("Question Answering"):
|
|
|
|
| 108 |
incorrect = gr.Number(label="Number of incorrect classifications", value=0)
|
| 109 |
accuracy = gr.Number(label="Model Accuracy", value=0)
|
| 110 |
|
| 111 |
+
accuracy_button = gr.Button("Calculate Accuracy")
|
| 112 |
+
predict_button.click(load_and_analyze_csv, inputs=[file_input, text_field, event_model],
|
| 113 |
+
outputs=[flood_checkbox_output, fire_checkbox_output, none_checkbox_output, model_confidence])
|
| 114 |
+
accuracy_button.click(calculate_accuracy, inputs=[flood_checkbox_output, fire_checkbox_output, none_checkbox_output],
|
| 115 |
outputs=incorrect)
|
| 116 |
|
| 117 |
with gr.Tab("Question Answering"):
|