Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
gr.
|
106 |
-
|
107 |
-
|
108 |
-
|
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()
|