Spaces:
Sleeping
Sleeping
Update Discussion_Buddy.py
Browse files- Discussion_Buddy.py +2 -2
Discussion_Buddy.py
CHANGED
@@ -170,12 +170,12 @@ def chatbot_interaction(user_message, history, news, user_reaction, user_languag
|
|
170 |
memory.chat_memory.add_ai_message(initial_response)
|
171 |
memory.chat_memory.add_user_message(f"Learn and become good presenter based on this news {news}, after that you will discuss with user about this news and make sure using {user_language} language and their ekspression : {user_reaction}")
|
172 |
history.append([f"👤 {user_message}", f"<img src='{logo}' style='width:30px; height:30px;'> { initial_response}"])
|
173 |
-
return history,
|
174 |
memory.chat_memory.add_user_message(user_message)
|
175 |
gpt_response = conversation.predict(input=user_message)
|
176 |
memory.chat_memory.add_ai_message(gpt_response)
|
177 |
history.append([f"👤 {user_message}",f"<img src='{logo}' style='width:30px; height:30px;'> {gpt_response}"] )
|
178 |
-
return history,
|
179 |
|
180 |
#Building UI from Gradio
|
181 |
#Step 1
|
|
|
170 |
memory.chat_memory.add_ai_message(initial_response)
|
171 |
memory.chat_memory.add_user_message(f"Learn and become good presenter based on this news {news}, after that you will discuss with user about this news and make sure using {user_language} language and their ekspression : {user_reaction}")
|
172 |
history.append([f"👤 {user_message}", f"<img src='{logo}' style='width:30px; height:30px;'> { initial_response}"])
|
173 |
+
return history, initial_response
|
174 |
memory.chat_memory.add_user_message(user_message)
|
175 |
gpt_response = conversation.predict(input=user_message)
|
176 |
memory.chat_memory.add_ai_message(gpt_response)
|
177 |
history.append([f"👤 {user_message}",f"<img src='{logo}' style='width:30px; height:30px;'> {gpt_response}"] )
|
178 |
+
return history, gpt_response
|
179 |
|
180 |
#Building UI from Gradio
|
181 |
#Step 1
|