Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -137,9 +137,34 @@ with gr.Blocks() as demo:
|
|
137 |
|
138 |
with gr.Tab("Question Answering"):
|
139 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
-
analysis_button = gr.Button("Analyze Selected Texts")
|
142 |
-
analysis_output = gr.DataFrame(headers=["Selected Text", "Analysis"])
|
143 |
-
analysis_button.click(analyze_selected_texts, inputs=flood_checkbox_output, outputs=analysis_output)
|
144 |
|
145 |
demo.launch()
|
|
|
137 |
|
138 |
with gr.Tab("Question Answering"):
|
139 |
# XXX Add some button disabling here, if the classification process is not completed first XXX
|
140 |
+
|
141 |
+
queries = [
|
142 |
+
"What areas are being evacuated?",
|
143 |
+
"What areas are predicted to be impacted?",
|
144 |
+
"What areas are without power?",
|
145 |
+
"What barriers are hindering response efforts?",
|
146 |
+
"What events have been canceled?",
|
147 |
+
"What preparations are being made?",
|
148 |
+
"What regions have announced a state of emergency?",
|
149 |
+
"What roads are blocked / closed?",
|
150 |
+
"What services have been closed?",
|
151 |
+
"What warnings are currently in effect?",
|
152 |
+
"Where are emergency services deployed?",
|
153 |
+
"Where are emergency services needed?",
|
154 |
+
"Where are evacuations needed?",
|
155 |
+
"Where are people needing rescued?",
|
156 |
+
"Where are recovery efforts taking place?",
|
157 |
+
"Where has building or infrastructure damage occurred?",
|
158 |
+
"Where has flooding occured?"
|
159 |
+
"Where are volunteers being requested?",
|
160 |
+
"Where has road damage occured?",
|
161 |
+
"What area has the wildfire burned?",
|
162 |
+
"Where have homes been damaged or destroyed?"]
|
163 |
+
|
164 |
+
selected_queries = gr.CheckboxGroup(label="Select at least one query using the checkboxes", interactive=True)
|
165 |
|
166 |
+
# analysis_button = gr.Button("Analyze Selected Texts")
|
167 |
+
# analysis_output = gr.DataFrame(headers=["Selected Text", "Analysis"])
|
168 |
+
# analysis_button.click(analyze_selected_texts, inputs=flood_checkbox_output, outputs=analysis_output)
|
169 |
|
170 |
demo.launch()
|