Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,8 @@ def respond(
|
|
25 |
|
26 |
# Dịch câu hỏi của người dùng từ tiếng Việt sang tiếng Anh
|
27 |
message_blob = TextBlob(message)
|
|
|
|
|
28 |
message_en = str(message_blob.translate(to='en'))
|
29 |
|
30 |
# Thêm các tin nhắn lịch sử vào messages
|
@@ -56,6 +58,8 @@ def respond(
|
|
56 |
return f"Error: {str(e)}"
|
57 |
|
58 |
response_blob = TextBlob(response)
|
|
|
|
|
59 |
response_vi = str(response_blob.translate(to='vi'))
|
60 |
logging.info(f"Successfully generated text: {response}")
|
61 |
|
|
|
25 |
|
26 |
# Dịch câu hỏi của người dùng từ tiếng Việt sang tiếng Anh
|
27 |
message_blob = TextBlob(message)
|
28 |
+
logging.info(f"User message blob directory: {dir(message_blob)}")
|
29 |
+
|
30 |
message_en = str(message_blob.translate(to='en'))
|
31 |
|
32 |
# Thêm các tin nhắn lịch sử vào messages
|
|
|
58 |
return f"Error: {str(e)}"
|
59 |
|
60 |
response_blob = TextBlob(response)
|
61 |
+
logging.info(f"Bot message blob directory: {dir(response_blob)}")
|
62 |
+
|
63 |
response_vi = str(response_blob.translate(to='vi'))
|
64 |
logging.info(f"Successfully generated text: {response}")
|
65 |
|