DeepMount00 commited on
Commit
59feb7d
1 Parent(s): 5413914

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -28,11 +28,11 @@ def predict(contesto, domanda):
28
 
29
  input_ids = tokenizer([prompt], return_tensors="pt").to(device)
30
 
31
- generate_ids = model.generate(**input_ids, max_new_tokens=150, eos_token_id=0)
32
 
33
  answer = tokenizer.batch_decode(generate_ids)
34
  try:
35
- final_answer = answer[0].split("##RISPOSTA: ")[1].split('\n', 1)[0]
36
  except IndexError:
37
  final_answer = ""
38
  return final_answer
 
28
 
29
  input_ids = tokenizer([prompt], return_tensors="pt").to(device)
30
 
31
+ generate_ids = model.generate(**input_ids, max_new_tokens=150, eos_token_id=8112)
32
 
33
  answer = tokenizer.batch_decode(generate_ids)
34
  try:
35
+ final_answer = answer[0].split("##RISPOSTA: ")[1].split("##END")[0].strip("\n")
36
  except IndexError:
37
  final_answer = ""
38
  return final_answer