Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -284,9 +284,7 @@ suggestion = [
|
|
284 |
|
285 |
def respond(message, chat_history):
|
286 |
response = generate_text(message)
|
287 |
-
|
288 |
-
chat_history.append((message, None ))
|
289 |
-
chat_history.append((None, response))
|
290 |
return "",chat_history
|
291 |
|
292 |
def suggestion1(chat_history):
|
@@ -320,7 +318,7 @@ with gr.Blocks(theme=theme, css=css) as demo: # Suppression de 'css=css' si 'cs
|
|
320 |
</div>
|
321 |
""")
|
322 |
with gr.Column(elem_id="chat-interface"):
|
323 |
-
chat = gr.Chatbot(elem_id="chat-messages", show_label=False, avatar_images=[bot_profile_image,
|
324 |
with gr.Row(elem_id="suggestions"):
|
325 |
sugg1 = gr.Button(suggestion[0], elem_classes="suggestion-btn").click(
|
326 |
suggestion1, inputs=[chat], outputs=[chat]
|
|
|
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):
|
|
|
318 |
</div>
|
319 |
""")
|
320 |
with gr.Column(elem_id="chat-interface"):
|
321 |
+
chat = gr.Chatbot(elem_id="chat-messages", show_label=False, avatar_images=[user_profile_image,bot_profile_image],value=[["","Ask anything about medicine / scientific research !"]])
|
322 |
with gr.Row(elem_id="suggestions"):
|
323 |
sugg1 = gr.Button(suggestion[0], elem_classes="suggestion-btn").click(
|
324 |
suggestion1, inputs=[chat], outputs=[chat]
|