bhavnapatur commited on
Commit
7fe40bc
·
verified ·
1 Parent(s): 72f6c4b

changed it back to tabbed ersion

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -105,19 +105,12 @@ def respond(message, history):
105
 
106
  with gr.Blocks() as app:
107
  gr.Markdown("# 🌍 Where Should I Travel?")
108
- with gr.Row():
109
- with gr.Column(scale=1):
110
- travel_location_input = gr.Textbox(label="Where do you want to travel?")
111
- age_range_input = gr.Dropdown(["Yes", "No"], label="Will you be travelling with minors?")
112
- length_input = gr.Textbox(label="How long will your trip be?")
113
- send_button = gr.Button("Create itinerary")
114
 
115
- with gr.Column(scale=2):
116
- output_box = gr.Markdown(label="AI Travel Plan")
117
- with gr.Column(scale=1):
118
  create_quiz(questions_europe, match_europe)
119
 
120
- with gr.Column(scale=2):
121
  gr.ChatInterface(
122
  respond,
123
  type="messages",
@@ -128,11 +121,5 @@ with gr.Blocks() as app:
128
  "I want to learn more about the language, food, and culture of the place I'm traveling to."
129
  ]
130
  )
131
- send_button.click(
132
- respond,
133
- inputs=[travel_location_input, age_range_input, length_input, send_button],
134
- outputs=[output_box]
135
- )
136
 
137
  app.launch(debug=True)
138
-
 
105
 
106
  with gr.Blocks() as app:
107
  gr.Markdown("# 🌍 Where Should I Travel?")
 
 
 
 
 
 
108
 
109
+ with gr.Tabs():
110
+ with gr.TabItem("Europe Quiz"):
 
111
  create_quiz(questions_europe, match_europe)
112
 
113
+ with gr.TabItem("Travel Chatbot"):
114
  gr.ChatInterface(
115
  respond,
116
  type="messages",
 
121
  "I want to learn more about the language, food, and culture of the place I'm traveling to."
122
  ]
123
  )
 
 
 
 
 
124
 
125
  app.launch(debug=True)