Eric Marchand commited on
Commit
a3cdc7b
·
1 Parent(s): b47405b

skip_special_tokens à False

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -61,9 +61,10 @@ with gr.Blocks(title="Lucie",
61
  do_sample=True,
62
  pad_token_id=TOKENIZER.eos_token_id
63
  )
64
- response = TOKENIZER.decode(outputs[0], skip_special_tokens=True)
 
65
  r = response.split("<assistant>")[1].strip()
66
- r = r.split("</assistant")[0].strip()
67
  # r = response
68
  return r
69
 
 
61
  do_sample=True,
62
  pad_token_id=TOKENIZER.eos_token_id
63
  )
64
+ # response = TOKENIZER.decode(outputs[0], skip_special_tokens=True)
65
+ response = TOKENIZER.decode(outputs[0], skip_special_tokens=False)
66
  r = response.split("<assistant>")[1].strip()
67
+ r = r.split("</")[0].strip()
68
  # r = response
69
  return r
70