Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ model = PeftModel.from_pretrained(model, peft_model_id)
|
|
| 17 |
|
| 18 |
|
| 19 |
def make_inference(abstract):
|
| 20 |
-
batch = tokenizer(f"Keywords:\n", return_tensors='pt')
|
| 21 |
|
| 22 |
with torch.cuda.amp.autocast():
|
| 23 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|
|
|
|
| 17 |
|
| 18 |
|
| 19 |
def make_inference(abstract):
|
| 20 |
+
batch = tokenizer(f"Below is an abstract\n\n### Abstract:\n{abstract}\n### Keywords:\n", return_tensors='pt')
|
| 21 |
|
| 22 |
with torch.cuda.amp.autocast():
|
| 23 |
output_tokens = model.generate(**batch, max_new_tokens=50)
|