Spaces:
Sleeping
Sleeping
utf encoding
Browse files
app.py
CHANGED
@@ -3,7 +3,9 @@ from main import chat, index_url
|
|
3 |
|
4 |
"""Use text to call chat method from main.py"""
|
5 |
def add_text(history, text):
|
6 |
-
response =
|
|
|
|
|
7 |
history = history + [(text, response)]
|
8 |
return history, ""
|
9 |
|
|
|
3 |
|
4 |
"""Use text to call chat method from main.py"""
|
5 |
def add_text(history, text):
|
6 |
+
response = chat(question=text)
|
7 |
+
response = response.encode("utf-8", "ignore").decode("utf-8")
|
8 |
+
print(response)
|
9 |
history = history + [(text, response)]
|
10 |
return history, ""
|
11 |
|