acidtib commited on
Commit
0ff9e10
·
1 Parent(s): fc10a8b

✨ refactor: update UI title and enhance user input options

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +17 -12
Gradio_UI.py CHANGED
@@ -261,10 +261,10 @@ class GradioUI:
261
  def launch(self, **kwargs):
262
  import gradio as gr
263
 
264
- with gr.Blocks(title="Travel Planning Assistant", fill_height=True) as demo:
265
  gr.Markdown(
266
  """
267
- # Travel Planning Assistant
268
  I can help you plan your trips, find the best time to travel, and provide information about destinations. Ask me about travel costs, best seasons to visit, or specific routes!
269
  """
270
  )
@@ -280,16 +280,21 @@ class GradioUI:
280
  resizeable=True,
281
  scale=1,
282
  )
283
- # If an upload folder is provided, enable the upload feature
284
- if self.file_upload_folder is not None:
285
- upload_file = gr.File(label="Upload a file")
286
- upload_status = gr.Textbox(label="Upload Status", interactive=False, visible=False)
287
- upload_file.change(
288
- self.upload_file,
289
- [upload_file, file_uploads_log],
290
- [upload_status, file_uploads_log],
291
- )
292
- text_input = gr.Textbox(lines=1, label="Chat Message", placeholder="Ask me anything about travel, destinations, or trip planning...")
 
 
 
 
 
293
  text_input.submit(
294
  self.log_user_message,
295
  [text_input, file_uploads_log],
 
261
  def launch(self, **kwargs):
262
  import gradio as gr
263
 
264
+ with gr.Blocks(title="Travel Planning Agent", fill_height=True) as demo:
265
  gr.Markdown(
266
  """
267
+ # Travel Planning Agent
268
  I can help you plan your trips, find the best time to travel, and provide information about destinations. Ask me about travel costs, best seasons to visit, or specific routes!
269
  """
270
  )
 
280
  resizeable=True,
281
  scale=1,
282
  )
283
+ text_input = gr.Textbox(
284
+ label="Ask me anything about travel",
285
+ placeholder="Type your travel question here...",
286
+ )
287
+ gr.Examples(
288
+ examples=[
289
+ "What is the cheapest month to travel to Tokyo, Japan?",
290
+ "Find the best flight options from Denver, Colorado to Tokyo, Japan.",
291
+ "What is the typical weather in Tokyo during April?",
292
+ "What are the top must-visit attractions in Tokyo for first-time travelers?",
293
+ "How can I get from Narita Airport to Shinjuku using public transportation?"
294
+ ],
295
+ inputs=text_input,
296
+ label="Example Questions"
297
+ )
298
  text_input.submit(
299
  self.log_user_message,
300
  [text_input, file_uploads_log],