Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,12 @@ def respond(message, history):
|
|
39 |
if not answer_vi.strip(): # if the response is empty
|
40 |
answer_vi = "Sorry, I couldn't understand the question."
|
41 |
|
42 |
-
#
|
43 |
history.append((message, answer_vi))
|
44 |
|
|
|
|
|
|
|
45 |
return "", history
|
46 |
|
47 |
# 3) Gradio ChatInterface
|
|
|
39 |
if not answer_vi.strip(): # if the response is empty
|
40 |
answer_vi = "Sorry, I couldn't understand the question."
|
41 |
|
42 |
+
# Make sure to append the message and response as a tuple of strings
|
43 |
history.append((message, answer_vi))
|
44 |
|
45 |
+
# Log the formatted history
|
46 |
+
logging.info(f"Message: {message}, Answer: {answer_vi}")
|
47 |
+
|
48 |
return "", history
|
49 |
|
50 |
# 3) Gradio ChatInterface
|