Azhs commited on
Commit
0f3561e
·
verified ·
1 Parent(s): 2089107

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -264,6 +264,9 @@ def suggestion3():
264
  return [["user", suggestion_text_3], ["bot", response]]
265
  """
266
 
 
 
 
267
  with gr.Blocks(theme=theme, css=css) as demo:
268
  gr.Markdown("""
269
  <div id='header'>
@@ -273,14 +276,14 @@ with gr.Blocks(theme=theme, css=css) as demo:
273
  </div>
274
  """)
275
  with gr.Column(elem_id="chat-interface"):
276
- chat = gr.Chatbot(elem_id="chat-messages", show_label=False)
277
  with gr.Row(elem_id="suggestions"):
278
  #for i in suggestion:
279
  # gr.Button(i, elem_classes="suggestion-btn").click(
280
  # respond(i,chat)
281
  # )
282
  sugg1 = gr.Button(suggestion[0], elem_classes="suggestion-btn").click(
283
- lambda: respond, inputs=[suggestion[0], chat], outputs= [chat, chat]
284
  )
285
  sugg2 = gr.Button(suggestion[1], elem_classes="suggestion-btn").click(
286
  suggestion1, outputs=chat
 
264
  return [["user", suggestion_text_3], ["bot", response]]
265
  """
266
 
267
+ user_profile_image = "https://github.com/LucasAguetai/ALOQAS/blob/main/Ressources/ALOQAS%20logo.png?raw=trueg"
268
+ bot_profile_image = "https://github.com/LucasAguetai/ALOQAS/blob/main/Ressources/ALOQAS%20logo.png?raw=trueg"
269
+
270
  with gr.Blocks(theme=theme, css=css) as demo:
271
  gr.Markdown("""
272
  <div id='header'>
 
276
  </div>
277
  """)
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
+ fn: respond, inputs=[suggestion[0], chat], outputs= [chat, chat]
287
  )
288
  sugg2 = gr.Button(suggestion[1], elem_classes="suggestion-btn").click(
289
  suggestion1, outputs=chat