Spaces:
Runtime error
Runtime error
Commit
·
751a5e2
1
Parent(s):
ae058c5
Update app.py
Browse files
app.py
CHANGED
@@ -301,12 +301,11 @@ def summarize_abstract(path):
|
|
301 |
truncation=True,
|
302 |
return_tensors='pt')
|
303 |
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
do_sample=True)
|
310 |
|
311 |
summary=tokenizer.decode(decoded_ids[0], skip_special_tokens=True)
|
312 |
|
|
|
301 |
truncation=True,
|
302 |
return_tensors='pt')
|
303 |
|
304 |
+
decoded_ids = model.generate(input_ids=encoding['input_ids'],
|
305 |
+
attention_mask=encoding['attention_mask'],
|
306 |
+
max_length=512,
|
307 |
+
top_p=.9,
|
308 |
+
do_sample=True)
|
|
|
309 |
|
310 |
summary=tokenizer.decode(decoded_ids[0], skip_special_tokens=True)
|
311 |
|