oleksandrburlakov commited on
Commit
05b6ab6
·
verified ·
1 Parent(s): 67e7d91

Update styles

Browse files
Files changed (1) hide show
  1. app.py +2 -11
app.py CHANGED
@@ -140,16 +140,13 @@ def respond_on_user_msg(chat_history, storage):
140
  def create_application():
141
  with gr.Blocks(css=CSS, fill_height=True) as demo:
142
  storage = gr.State({})
143
- chatbot = gr.Chatbot(label="Facility managment bot", elem_id="chatbot")
144
  btn_list = []
145
  with gr.Row():
146
  for i in range(6):
147
- btn = gr.Button(visible=False)
148
  btn_list.append(btn)
149
  msg = gr.Textbox(label="Answer", interactive=False)
150
- with gr.Row():
151
- clear_btn = gr.ClearButton(chatbot)
152
- btn = gr.Button("Submit")
153
 
154
  def user(user_message, history):
155
  return "", history + [[user_message, None]]
@@ -177,12 +174,6 @@ def create_application():
177
  disable_msg_flow = [disable_msg, None, msg]
178
  enable_msg_flow = [enable_msg, None, msg]
179
 
180
- btn.click(*add_user_message_flow
181
- ).then(*hide_suggestions_flow
182
- ).then(*disable_msg_flow
183
- ).then(*chat_response_flow
184
- ).then(*update_suggestions_flow
185
- ).then(*enable_msg_flow)
186
  msg.submit(*add_user_message_flow
187
  ).then(*hide_suggestions_flow
188
  ).then(*disable_msg_flow
 
140
  def create_application():
141
  with gr.Blocks(css=CSS, fill_height=True) as demo:
142
  storage = gr.State({})
143
+ chatbot = gr.Chatbot(label="Facility managment bot", show_label=False, show_share_button=False, elem_id="chatbot")
144
  btn_list = []
145
  with gr.Row():
146
  for i in range(6):
147
+ btn = gr.Button(visible=False, size="sm")
148
  btn_list.append(btn)
149
  msg = gr.Textbox(label="Answer", interactive=False)
 
 
 
150
 
151
  def user(user_message, history):
152
  return "", history + [[user_message, None]]
 
174
  disable_msg_flow = [disable_msg, None, msg]
175
  enable_msg_flow = [enable_msg, None, msg]
176
 
 
 
 
 
 
 
177
  msg.submit(*add_user_message_flow
178
  ).then(*hide_suggestions_flow
179
  ).then(*disable_msg_flow