Spaces:
Running
Running
Adding labels to the chatbox
Browse filesMaking Start Chat button invisible after chat has started
app.py
CHANGED
@@ -291,8 +291,8 @@ with gr.Blocks() as demo:
|
|
291 |
|
292 |
# Chat interface (hidden initially)
|
293 |
with gr.Row(visible=False) as chat_interface:
|
294 |
-
chatbot = gr.Chatbot()
|
295 |
-
input_msg = gr.Textbox()
|
296 |
|
297 |
# Chat controls
|
298 |
start_chat_btn = gr.Button("Start Chat", visible=False)
|
@@ -317,7 +317,9 @@ with gr.Blocks() as demo:
|
|
317 |
).then(
|
318 |
lambda: gr.Row(visible=True),
|
319 |
outputs=chat_interface
|
320 |
-
)
|
|
|
|
|
321 |
|
322 |
input_msg.submit(
|
323 |
respond,
|
|
|
291 |
|
292 |
# Chat interface (hidden initially)
|
293 |
with gr.Row(visible=False) as chat_interface:
|
294 |
+
chatbot = gr.Chatbot(label='Chat with the itinerary')
|
295 |
+
input_msg = gr.Textbox(label='Ask a question')
|
296 |
|
297 |
# Chat controls
|
298 |
start_chat_btn = gr.Button("Start Chat", visible=False)
|
|
|
317 |
).then(
|
318 |
lambda: gr.Row(visible=True),
|
319 |
outputs=chat_interface
|
320 |
+
).then(
|
321 |
+
lambda: gr.Button(visible=False),
|
322 |
+
outputs=start_chat_btn)
|
323 |
|
324 |
input_msg.submit(
|
325 |
respond,
|