m-ric HF staff commited on
Commit
084cb82
โ€ข
1 Parent(s): 16460f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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="```text\n" + description_sf + "\n```",
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_rationale = gr.Markdown(example_rationale)
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_rationale])
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_rationale]
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__":