Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -592,8 +592,8 @@ def _summarize(text):
|
|
592 |
toks = tokenizer.encode( prefix + text, return_tensors="pt", truncation=False)
|
593 |
gen = model.generate(
|
594 |
toks,
|
595 |
-
length_penalty=0
|
596 |
-
num_beams=
|
597 |
early_stopping=True,
|
598 |
max_length=512
|
599 |
)
|
|
|
592 |
toks = tokenizer.encode( prefix + text, return_tensors="pt", truncation=False)
|
593 |
gen = model.generate(
|
594 |
toks,
|
595 |
+
length_penalty=2.0,
|
596 |
+
num_beams=4,
|
597 |
early_stopping=True,
|
598 |
max_length=512
|
599 |
)
|