Azhs commited on
Commit
f2d254d
1 Parent(s): 865e3fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -284,9 +284,8 @@ suggestion = [
284
 
285
  def respond(message, chat_history):
286
  response = generate_text(message)
287
- chat_history.append((None, message))
288
- chat_history.append((response, None))
289
- return chat_history
290
 
291
  def suggestion1(chat_history):
292
  response = generate_text(suggestion[0])
@@ -331,7 +330,7 @@ with gr.Blocks(theme=theme, css=css) as demo: # Suppression de 'css=css' si 'cs
331
  suggestion3, inputs=[chat], outputs=chat
332
  )
333
  with gr.Row(elem_id="input-area"):
334
- text_input = gr.Textbox(placeholder="Write to ALOQAS...", show_label=False)
335
- text_input.submit(respond, inputs=[text_input, chat], outputs=chat)
336
 
337
  demo.launch(share=False)
 
284
 
285
  def respond(message, chat_history):
286
  response = generate_text(message)
287
+ chat_history.append((message,response+"."))
288
+ return "",chat_history
 
289
 
290
  def suggestion1(chat_history):
291
  response = generate_text(suggestion[0])
 
330
  suggestion3, inputs=[chat], outputs=chat
331
  )
332
  with gr.Row(elem_id="input-area"):
333
+ text_input = gr.Textbox(placeholder="Ask anything about medicine / scientific research !", show_label=False)
334
+ text_input.submit(respond, inputs=[text_input, chat], outputs=[text_input,chat])
335
 
336
  demo.launch(share=False)