Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ summarizer = pipeline("summarization")
|
|
4 |
|
5 |
def translate(text):
|
6 |
text = text.replace(""",'"').replace("'","'").replace("&","&")
|
7 |
-
result = summarizer(text,
|
8 |
return result[0]["summary_text"]
|
9 |
|
10 |
iface = gr.Interface(fn=translate,
|
|
|
4 |
|
5 |
def translate(text):
|
6 |
text = text.replace(""",'"').replace("'","'").replace("&","&")
|
7 |
+
result = summarizer(text, max_length=45, clean_up_tokenization_spaces=True)
|
8 |
return result[0]["summary_text"]
|
9 |
|
10 |
iface = gr.Interface(fn=translate,
|