Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def greet(text):
|
|
17 |
|
18 |
# Use torch.no_grad to disable gradient calculation
|
19 |
with torch.no_grad():
|
20 |
-
output_tokens = model.generate(**batch, do_sample=True, max_new_tokens=50)
|
21 |
|
22 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
23 |
|
|
|
17 |
|
18 |
# Use torch.no_grad to disable gradient calculation
|
19 |
with torch.no_grad():
|
20 |
+
output_tokens = model.generate(**batch, do_sample=True, max_new_tokens=50, temperature=0.9, num_beams=5)
|
21 |
|
22 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
23 |
|