Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,8 +61,10 @@ def calculate_accuracy(flood_selections, fire_selections, none_selections, num_p
|
|
| 61 |
data_df.to_csv("output.csv")
|
| 62 |
return incorrect, correct, accuracy, data_df, gr.DownloadButton(label=f"Download CSV", value="output.csv", visible=True)
|
| 63 |
|
| 64 |
-
def
|
| 65 |
-
history = history or [
|
|
|
|
|
|
|
| 66 |
"What areas are being evacuated?",
|
| 67 |
"What areas are predicted to be impacted?",
|
| 68 |
"What areas are without power?",
|
|
@@ -84,32 +86,8 @@ def get_queries(to_add, history):
|
|
| 84 |
"Where has road damage occured?",
|
| 85 |
"What area has the wildfire burned?",
|
| 86 |
"Where have homes been damaged or destroyed?"]
|
| 87 |
-
|
| 88 |
|
| 89 |
-
|
| 90 |
-
# "What areas are being evacuated?",
|
| 91 |
-
# "What areas are predicted to be impacted?",
|
| 92 |
-
# "What areas are without power?",
|
| 93 |
-
# "What barriers are hindering response efforts?",
|
| 94 |
-
# "What events have been canceled?",
|
| 95 |
-
# "What preparations are being made?",
|
| 96 |
-
# "What regions have announced a state of emergency?",
|
| 97 |
-
# "What roads are blocked / closed?",
|
| 98 |
-
# "What services have been closed?",
|
| 99 |
-
# "What warnings are currently in effect?",
|
| 100 |
-
# "Where are emergency services deployed?",
|
| 101 |
-
# "Where are emergency services needed?",
|
| 102 |
-
# "Where are evacuations needed?",
|
| 103 |
-
# "Where are people needing rescued?",
|
| 104 |
-
# "Where are recovery efforts taking place?",
|
| 105 |
-
# "Where has building or infrastructure damage occurred?",
|
| 106 |
-
# "Where has flooding occured?"
|
| 107 |
-
# "Where are volunteers being requested?",
|
| 108 |
-
# "Where has road damage occured?",
|
| 109 |
-
# "What area has the wildfire burned?",
|
| 110 |
-
# "Where have homes been damaged or destroyed?"]
|
| 111 |
-
if to_add != "dummy":
|
| 112 |
-
history.append(to_add)
|
| 113 |
|
| 114 |
return gr.CheckboxGroup(choices=history), history
|
| 115 |
|
|
|
|
| 61 |
data_df.to_csv("output.csv")
|
| 62 |
return incorrect, correct, accuracy, data_df, gr.DownloadButton(label=f"Download CSV", value="output.csv", visible=True)
|
| 63 |
|
| 64 |
+
def init_queries(history):
|
| 65 |
+
history = history or []
|
| 66 |
+
|
| 67 |
+
queries = [
|
| 68 |
"What areas are being evacuated?",
|
| 69 |
"What areas are predicted to be impacted?",
|
| 70 |
"What areas are without power?",
|
|
|
|
| 86 |
"Where has road damage occured?",
|
| 87 |
"What area has the wildfire burned?",
|
| 88 |
"Where have homes been damaged or destroyed?"]
|
|
|
|
| 89 |
|
| 90 |
+
history.extend(queries)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
return gr.CheckboxGroup(choices=history), history
|
| 93 |
|