Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,13 +14,11 @@ def text2text_summary(para):
|
|
| 14 |
max_length=250,
|
| 15 |
num_beams=5,
|
| 16 |
repetition_penalty=2.5,
|
| 17 |
-
early_stopping=True
|
| 18 |
-
)
|
| 19 |
-
|
| 20 |
response = text2text_token.decode(token_ids[0], skip_special_tokens=True)
|
| 21 |
return response
|
| 22 |
|
| 23 |
# UX
|
| 24 |
-
in_para = gr.Textbox(lines=10, label="
|
| 25 |
out = gr.Textbox(lines=1, label="Summary")
|
| 26 |
gr.Interface(text2text_summary, inputs=in_para, outputs=out).launch()
|
|
|
|
| 14 |
max_length=250,
|
| 15 |
num_beams=5,
|
| 16 |
repetition_penalty=2.5,
|
| 17 |
+
early_stopping=True )
|
|
|
|
|
|
|
| 18 |
response = text2text_token.decode(token_ids[0], skip_special_tokens=True)
|
| 19 |
return response
|
| 20 |
|
| 21 |
# UX
|
| 22 |
+
in_para = gr.Textbox(lines=10, label="Input paragraph", placeholder="Place your paragraph to summarize here...")
|
| 23 |
out = gr.Textbox(lines=1, label="Summary")
|
| 24 |
gr.Interface(text2text_summary, inputs=in_para, outputs=out).launch()
|