Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def calculate_accuracy(flood_selections, fire_selections, none_selections, num_p
|
|
55 |
accuracy = (correct/num_posts)*100
|
56 |
|
57 |
data_df.to_csv("output.csv")
|
58 |
-
return incorrect, correct, accuracy, data_df, gr.DownloadButton(label=f"Download CSV", value="output.csv", visible=True)
|
59 |
|
60 |
|
61 |
|
@@ -121,11 +121,10 @@ with gr.Blocks() as demo:
|
|
121 |
accuracy = gr.Number(label="Model Accuracy (%)")
|
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()
|
129 |
|
130 |
predict_button.click(
|
131 |
load_and_analyze_csv,
|
|
|
55 |
accuracy = (correct/num_posts)*100
|
56 |
|
57 |
data_df.to_csv("output.csv")
|
58 |
+
return incorrect, correct, accuracy, data_df, gr.DownloadButton(label=f"Download CSV", value="output.csv", visible=True)
|
59 |
|
60 |
|
61 |
|
|
|
121 |
accuracy = gr.Number(label="Model Accuracy (%)")
|
122 |
|
123 |
accuracy_button = gr.Button("Calculate Accuracy")
|
|
|
124 |
download_csv = gr.DownloadButton(visible=False)
|
125 |
num_posts = gr.Number(visible=False)
|
126 |
data = gr.DataFrame(visible=False)
|
127 |
+
data_eval = gr.DataFrame(visible=False)
|
128 |
|
129 |
predict_button.click(
|
130 |
load_and_analyze_csv,
|