Commit ·
12eeb09
1
Parent(s): 6df4bad
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def make_inference(abstract):
|
|
| 22 |
batch = tokenizer(input_str, return_tensors="pt")
|
| 23 |
|
| 24 |
with torch.cuda.amp.autocast():
|
| 25 |
-
output_tokens = model.generate(**batch, max_new_tokens=
|
| 26 |
|
| 27 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
| 28 |
|
|
|
|
| 22 |
batch = tokenizer(input_str, return_tensors="pt")
|
| 23 |
|
| 24 |
with torch.cuda.amp.autocast():
|
| 25 |
+
output_tokens = model.generate(**batch, max_new_tokens=50)
|
| 26 |
|
| 27 |
return tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
| 28 |
|