Azhs commited on
Commit
da2afc2
1 Parent(s): 7f193ca

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -252,7 +252,7 @@ def respond(message,chat_history):
252
 
253
 
254
  def suggestion1():
255
- response = generate_text(suggestion_text_1)
256
  return [suggestion_text_1,response]
257
  """
258
  def suggestion2():
@@ -278,12 +278,8 @@ with gr.Blocks(theme=theme, css=css) as demo:
278
  with gr.Column(elem_id="chat-interface"):
279
  chat = gr.Chatbot(elem_id="chat-messages", show_label=False,avatar_images=[user_profile_image,bot_profile_image])
280
  with gr.Row(elem_id="suggestions"):
281
- #for i in suggestion:
282
- # gr.Button(i, elem_classes="suggestion-btn").click(
283
- # respond(i,chat)
284
- # )
285
  sugg1 = gr.Button(suggestion[0], elem_classes="suggestion-btn").click(
286
- respond, inputs=[suggestion[0], chat], outputs= [chat, chat]
287
  )
288
  sugg2 = gr.Button(suggestion[1], elem_classes="suggestion-btn").click(
289
  suggestion1, outputs=chat
 
252
 
253
 
254
  def suggestion1():
255
+ response = generate_text(suggestion[0])
256
  return [suggestion_text_1,response]
257
  """
258
  def suggestion2():
 
278
  with gr.Column(elem_id="chat-interface"):
279
  chat = gr.Chatbot(elem_id="chat-messages", show_label=False,avatar_images=[user_profile_image,bot_profile_image])
280
  with gr.Row(elem_id="suggestions"):
 
 
 
 
281
  sugg1 = gr.Button(suggestion[0], elem_classes="suggestion-btn").click(
282
+ suggestion1, outputs=chat
283
  )
284
  sugg2 = gr.Button(suggestion[1], elem_classes="suggestion-btn").click(
285
  suggestion1, outputs=chat