Spaces:
Sleeping
Sleeping
alibidaran
commited on
Commit
•
a16de15
1
Parent(s):
e33b870
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def bot(history):
|
|
30 |
text=f"<s> ###Human: {prompt} ###Asistant: "
|
31 |
inputs=tokenizer(text,return_tensors='pt').to('cpu')
|
32 |
with torch.no_grad():
|
33 |
-
outputs=model.generate(**inputs,max_new_tokens=
|
34 |
output_text=outputs[:, inputs.input_ids.shape[1]:]
|
35 |
response=tokenizer.decode(output_text[0], skip_special_tokens=True)
|
36 |
print(response)
|
|
|
30 |
text=f"<s> ###Human: {prompt} ###Asistant: "
|
31 |
inputs=tokenizer(text,return_tensors='pt').to('cpu')
|
32 |
with torch.no_grad():
|
33 |
+
outputs=model.generate(**inputs,max_new_tokens=120,do_sample=True,top_p=0.92,top_k=10,temperature=0.7)
|
34 |
output_text=outputs[:, inputs.input_ids.shape[1]:]
|
35 |
response=tokenizer.decode(output_text[0], skip_special_tokens=True)
|
36 |
print(response)
|