Suku0 commited on
Commit
0f7292c
·
verified ·
1 Parent(s): 8fd9704

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -11
app.py CHANGED
@@ -96,16 +96,22 @@ def chatbot_response(query):
96
  description = hotel_infos[0]['description']
97
  return image, name, score, description
98
 
99
- interface = gr.Interface(
100
- fn=chatbot_response,
101
- inputs=gr.Textbox(label="Enter Your Query"),
102
- outputs=[
103
- gr.Image(label="Hotel Image"),
104
- gr.Textbox(label="Hotel Name"),
105
- gr.Textbox(label="Score"),
106
- gr.Textbox(label="Description")
107
- ],
108
- live=True
109
- )
 
 
 
 
 
 
110
 
111
  interface.launch()
 
96
  description = hotel_infos[0]['description']
97
  return image, name, score, description
98
 
99
+ with gr.Blocks() as interface:
100
+ with gr.Row():
101
+ with gr.Column(scale=1):
102
+ query_input = gr.Textbox(label="Enter Your Query")
103
+ submit_button = gr.Button("Submit")
104
+
105
+ with gr.Column(scale=2):
106
+ image_output = gr.Image(label="Hotel Image")
107
+ name_output = gr.Textbox(label="Hotel Name")
108
+ score_output = gr.Textbox(label="Score")
109
+ description_output = gr.Textbox(label="Description")
110
+
111
+ submit_button.click(
112
+ fn=chatbot_response,
113
+ inputs=query_input,
114
+ outputs=[image_output, name_output, score_output, description_output]
115
+ )
116
 
117
  interface.launch()