Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -195,22 +195,22 @@ with gr.Blocks(
|
|
195 |
gr.Markdown("# ๐บ๏ธ LLM trip planner (based on Mixtral)")
|
196 |
text = gr.Textbox(
|
197 |
label="Describe your trip here:",
|
198 |
-
value=
|
199 |
)
|
200 |
button = gr.Button()
|
201 |
gr.Markdown("### LLM Output ๐\n_Click the map to see information about the places._")
|
202 |
|
203 |
# Get initial map and rationale
|
204 |
example_dataframe, example_rationale = parse_llm_output(output_example_sf)
|
205 |
-
|
206 |
starting_map = create_map_from_markers(example_dataframe)
|
207 |
map = Folium(value=starting_map, height=600, label="Chosen locations")
|
208 |
-
button.click(run_display, inputs=[text], outputs=[map,
|
209 |
|
210 |
gr.Markdown("### Other examples")
|
211 |
clickable_examples = gr.DataFrame(value=df_examples, height=200)
|
212 |
clickable_examples.select(
|
213 |
-
select_example, clickable_examples, outputs=[text, map,
|
214 |
)
|
215 |
|
216 |
if __name__ == "__main__":
|
|
|
195 |
gr.Markdown("# ๐บ๏ธ LLM trip planner (based on Mixtral)")
|
196 |
text = gr.Textbox(
|
197 |
label="Describe your trip here:",
|
198 |
+
value=description_sf,
|
199 |
)
|
200 |
button = gr.Button()
|
201 |
gr.Markdown("### LLM Output ๐\n_Click the map to see information about the places._")
|
202 |
|
203 |
# Get initial map and rationale
|
204 |
example_dataframe, example_rationale = parse_llm_output(output_example_sf)
|
205 |
+
display_thoughts = gr.Markdown("```text\n" + output_example_sf + "\n```")
|
206 |
starting_map = create_map_from_markers(example_dataframe)
|
207 |
map = Folium(value=starting_map, height=600, label="Chosen locations")
|
208 |
+
button.click(run_display, inputs=[text], outputs=[map, display_thoughts])
|
209 |
|
210 |
gr.Markdown("### Other examples")
|
211 |
clickable_examples = gr.DataFrame(value=df_examples, height=200)
|
212 |
clickable_examples.select(
|
213 |
+
select_example, clickable_examples, outputs=[text, map, display_thoughts]
|
214 |
)
|
215 |
|
216 |
if __name__ == "__main__":
|