Update app.py
Browse files
app.py
CHANGED
@@ -99,10 +99,10 @@ def summarizer(input_text):
|
|
99 |
summary_ids = model.generate(
|
100 |
input_ids=model_inputs["input_ids"],
|
101 |
attention_mask=model_inputs["attention_mask"],
|
102 |
-
num_beams=
|
103 |
-
length_penalty=2.
|
104 |
max_length=max_target_length + 2, # +2 from original because we start at step=1 and stop before max_length
|
105 |
-
repetition_penalty=
|
106 |
early_stopping=True,
|
107 |
use_cache=True
|
108 |
)
|
|
|
99 |
summary_ids = model.generate(
|
100 |
input_ids=model_inputs["input_ids"],
|
101 |
attention_mask=model_inputs["attention_mask"],
|
102 |
+
num_beams=6,
|
103 |
+
length_penalty=2.5,
|
104 |
max_length=max_target_length + 2, # +2 from original because we start at step=1 and stop before max_length
|
105 |
+
repetition_penalty=3.5,
|
106 |
early_stopping=True,
|
107 |
use_cache=True
|
108 |
)
|