Spaces:
PhilSpiel
/
Sleeping

PhilSpiel commited on
Commit
e2f8197
·
verified ·
1 Parent(s): b765081

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -138,16 +138,17 @@ with gr.Blocks(theme, css="""
138
  code_message = gr.Label(label="Status", elem_id="code_message")
139
 
140
  with gr.Tab("Chat"):
141
- chatbot = gr.Chatbot(label="Conversation", height=340, autoscroll=True)
142
  with gr.Row():
143
  msg = gr.Textbox(
144
  label=f"Chat with {coach_name_short}",
145
  placeholder="Type your message here... (MAX: 1000 characters)",
146
  interactive=False
147
  )
148
- submit = gr.Button("Submit Message", interactive=False, variant="primary", scale=0.15)
149
 
150
- # In your predict function or wherever you handle the submit action
 
151
  submit.click(
152
  predict,
153
  inputs=[msg, chatbot, access_granted],
 
138
  code_message = gr.Label(label="Status", elem_id="code_message")
139
 
140
  with gr.Tab("Chat"):
141
+ chatbot = gr.Chatbot(label="Conversation", height=340) # Height adjusted as needed
142
  with gr.Row():
143
  msg = gr.Textbox(
144
  label=f"Chat with {coach_name_short}",
145
  placeholder="Type your message here... (MAX: 1000 characters)",
146
  interactive=False
147
  )
148
+ submit = gr.Button("Submit Message", interactive=False, scale=0.15)
149
 
150
+ # Make sure to add this part outside of the with gr.Tab("Chat") block,
151
+ # where you define other event handlers:
152
  submit.click(
153
  predict,
154
  inputs=[msg, chatbot, access_granted],