Spaces:
Runtime error
Runtime error
Update app.py
Browse filesSyntaxError: invalid non-printable character U+00A0
app.py
CHANGED
@@ -89,9 +89,9 @@ def summarize(text):
|
|
89 |
tokens = pegasus_tkn(text, truncation=True, padding="longest", return_tensors="pt")
|
90 |
txt_summary = mdl.generate(**tokens)
|
91 |
response = pegasus_tkn.batch_decode(txt_summary, skip_special_tokens=True)
|
92 |
-
|
93 |
|
94 |
txt = grad.Textbox(lines=10, label="English", placeholder="English Text here")
|
95 |
out = grad.Textbox(lines=10, label="Summary")
|
96 |
|
97 |
-
grad.Interface(summarize, inputs=txt, outputs=out).launch()
|
|
|
89 |
tokens = pegasus_tkn(text, truncation=True, padding="longest", return_tensors="pt")
|
90 |
txt_summary = mdl.generate(**tokens)
|
91 |
response = pegasus_tkn.batch_decode(txt_summary, skip_special_tokens=True)
|
92 |
+
return response
|
93 |
|
94 |
txt = grad.Textbox(lines=10, label="English", placeholder="English Text here")
|
95 |
out = grad.Textbox(lines=10, label="Summary")
|
96 |
|
97 |
+
grad.Interface(summarize, inputs=txt, outputs=out).launch()
|