Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -220,7 +220,8 @@ with gr.Blocks(
|
|
220 |
label="Describe your ideal trip:",
|
221 |
value=description_sf,
|
222 |
)
|
223 |
-
button = gr.Button()
|
|
|
224 |
gr.Markdown("### LLM Output ๐")
|
225 |
|
226 |
example_dataframe, example_rationale = parse_llm_output(output_example_sf)
|
@@ -230,9 +231,12 @@ with gr.Blocks(
|
|
230 |
# Get initial map
|
231 |
starting_map = create_map_from_markers(example_dataframe)
|
232 |
map = Folium(value=starting_map, height=600, label="Chosen locations")
|
233 |
-
button.click(run_display, inputs=[text], outputs=[map, display_thoughts])
|
234 |
|
235 |
-
|
|
|
|
|
|
|
|
|
236 |
clickable_examples.input(
|
237 |
select_example, clickable_examples, outputs=[text, map, display_thoughts]
|
238 |
)
|
|
|
220 |
label="Describe your ideal trip:",
|
221 |
value=description_sf,
|
222 |
)
|
223 |
+
button = gr.Button("Generate trip!")
|
224 |
+
|
225 |
gr.Markdown("### LLM Output ๐")
|
226 |
|
227 |
example_dataframe, example_rationale = parse_llm_output(output_example_sf)
|
|
|
231 |
# Get initial map
|
232 |
starting_map = create_map_from_markers(example_dataframe)
|
233 |
map = Folium(value=starting_map, height=600, label="Chosen locations")
|
|
|
234 |
|
235 |
+
# Trip examples
|
236 |
+
clickable_examples = gr.Dropdown(choices=trip_examples.keys(), label="Try a pre-selected example:", value=description_sf)
|
237 |
+
|
238 |
+
# Dynamics
|
239 |
+
button.click(run_display, inputs=[text], outputs=[map, display_thoughts])
|
240 |
clickable_examples.input(
|
241 |
select_example, clickable_examples, outputs=[text, map, display_thoughts]
|
242 |
)
|