ThongCoding commited on
Commit
94d445b
·
verified ·
1 Parent(s): 8c4c569

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- # Add to history and return it
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