LAKERFrank commited on
Commit
ecd405b
·
verified ·
1 Parent(s): e36871a

modify layout

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -13,10 +13,11 @@ def generate_response(input_text):
13
 
14
  travel_info = get_travel_info(user_query)
15
 
16
- if travel_info and travel_info.get("location"):
17
  travel_recommendations = get_travel_recommendations(
18
  travel_info.get("intent"),
19
- travel_info.get("location"),
 
20
  travel_info.get("departure_date"),
21
  travel_info.get("duration"),
22
  travel_info.get("budget"),
@@ -30,7 +31,7 @@ def generate_response(input_text):
30
 
31
  with gr.Blocks() as demo:
32
  gr.Markdown("## PDF Processing with Gemini API")
33
- message = "I want to go to Taipei with 6 people, we have three thousand USD for 5 days. we plan we depart at February 2nd"
34
  input_text = gr.Textbox(label="User Request", value=message, placeholder="Enter your travel detail here")
35
  submit = gr.Button("Generate")
36
  output_pdf = gr.File(label="Download Output PDF")
 
13
 
14
  travel_info = get_travel_info(user_query)
15
 
16
+ if travel_info and travel_info.get("to") and travel_info.get("from"):
17
  travel_recommendations = get_travel_recommendations(
18
  travel_info.get("intent"),
19
+ travel_info.get("from"),
20
+ travel_info.get("to"),
21
  travel_info.get("departure_date"),
22
  travel_info.get("duration"),
23
  travel_info.get("budget"),
 
31
 
32
  with gr.Blocks() as demo:
33
  gr.Markdown("## PDF Processing with Gemini API")
34
+ message = "I want to plan a trip from Taiwan to Tokyo for 5 days with a budget of $10000 for 2 people, leaving on March 1st."
35
  input_text = gr.Textbox(label="User Request", value=message, placeholder="Enter your travel detail here")
36
  submit = gr.Button("Generate")
37
  output_pdf = gr.File(label="Download Output PDF")