Update app.py (#2)
Browse files- Update app.py (a44b25de16acdc62dd3cba4ea1ba8c50350dd72f)
app.py
CHANGED
@@ -193,7 +193,7 @@ def main():
|
|
193 |
#st.text("Using Google T5 Transformer ..")
|
194 |
inputs = tokenizer.encode("summarize: " + text,
|
195 |
return_tensors='pt',
|
196 |
-
max_length=
|
197 |
truncation=True)
|
198 |
summary_ids = model.generate(inputs, max_length=150, min_length=80, length_penalty=5., num_beams=2)
|
199 |
summary = tokenizer.decode(summary_ids[0])
|
|
|
193 |
#st.text("Using Google T5 Transformer ..")
|
194 |
inputs = tokenizer.encode("summarize: " + text,
|
195 |
return_tensors='pt',
|
196 |
+
max_length= 512,
|
197 |
truncation=True)
|
198 |
summary_ids = model.generate(inputs, max_length=150, min_length=80, length_penalty=5., num_beams=2)
|
199 |
summary = tokenizer.decode(summary_ids[0])
|