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

on hon roi

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,13 +46,13 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
46
  eos_token_id=tokenizer.eos_token_id,
47
  pad_token_id=tokenizer.pad_token_id,
48
  )
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))
 
46
  eos_token_id=tokenizer.eos_token_id,
47
  pad_token_id=tokenizer.pad_token_id,
48
  )
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))