thanglekdi commited on
Commit
c53a8fe
·
1 Parent(s): d47cf3a

on hon roi

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -49,10 +49,11 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
49
  # print('!!!! OUTPUTS 1: ',outputs)
50
  # 2.5 — Decode và tách phần assistant trả lời
51
  response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
52
- print('!!!! OUTPUTS 2: ',response)
 
53
  response = response.split("### Trả lời:")[1]
54
  print('!!!! OUTPUTS 3: ',response)
55
- # yield response
56
 
57
  # 2.6 — Cập nhật history và trả về
58
  # history.append((message, response))
 
49
  # print('!!!! OUTPUTS 1: ',outputs)
50
  # 2.5 — Decode và tách phần assistant trả lời
51
  response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
52
+ print('!! OUTPUTS 2: ',response)
53
+
54
  response = response.split("### Trả lời:")[1]
55
  print('!!!! OUTPUTS 3: ',response)
56
+ return response
57
 
58
  # 2.6 — Cập nhật history và trả về
59
  # history.append((message, response))