Update main.py
Browse files
main.py
CHANGED
@@ -136,7 +136,7 @@ def write_response(response_dict: dict):
|
|
136 |
"""
|
137 |
|
138 |
# Check if the response is an answer.
|
139 |
-
|
140 |
|
141 |
@cl.set_chat_profiles
|
142 |
async def chat_profile():
|
@@ -166,4 +166,5 @@ async def on_message(message: cl.Message):
|
|
166 |
decoded_response = decode_response(response)
|
167 |
|
168 |
# Write the response to the Streamlit app.
|
169 |
-
write_response(decoded_response)
|
|
|
|
136 |
"""
|
137 |
|
138 |
# Check if the response is an answer.
|
139 |
+
return response_dict["answer"]
|
140 |
|
141 |
@cl.set_chat_profiles
|
142 |
async def chat_profile():
|
|
|
166 |
decoded_response = decode_response(response)
|
167 |
|
168 |
# Write the response to the Streamlit app.
|
169 |
+
result = write_response(decoded_response)
|
170 |
+
await cl.Message(author="COPILOT",content=GoogleTranslator(source='auto', target='fr').translate(result)).send()
|