Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -276,6 +276,12 @@ def update_map_with_response(history):
|
|
276 |
def clear_textbox():
|
277 |
return ""
|
278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
# Gradio Blocks interface
|
280 |
with gr.Blocks(theme='rawrsor1/Everforest') as demo:
|
281 |
with gr.Row():
|
@@ -314,7 +320,7 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
|
|
314 |
with gr.Column():
|
315 |
gr.Markdown("Locate the Events")
|
316 |
location_output = gr.HTML()
|
317 |
-
bot_msg.then(
|
318 |
|
319 |
setup_ui()
|
320 |
|
|
|
276 |
def clear_textbox():
|
277 |
return ""
|
278 |
|
279 |
+
def show_map_if_details(choice, history):
|
280 |
+
if choice == "Details":
|
281 |
+
return update_map_with_response(history)
|
282 |
+
else:
|
283 |
+
return ""
|
284 |
+
|
285 |
# Gradio Blocks interface
|
286 |
with gr.Blocks(theme='rawrsor1/Everforest') as demo:
|
287 |
with gr.Row():
|
|
|
320 |
with gr.Column():
|
321 |
gr.Markdown("Locate the Events")
|
322 |
location_output = gr.HTML()
|
323 |
+
bot_msg.then(show_map_if_details, chatbot, location_output)
|
324 |
|
325 |
setup_ui()
|
326 |
|