Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import gradio as gr
|
|
4 |
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-small", truncation=True, framework="tf" )
|
5 |
|
6 |
def translate(text):
|
7 |
-
text
|
8 |
-
text = text.replace('&
|
9 |
text = text.replace('&',"&")
|
10 |
result = summarizer(text,min_length=180,truncation=True)
|
11 |
return result[0]["summary_text"]
|
|
|
4 |
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-small", truncation=True, framework="tf" )
|
5 |
|
6 |
def translate(text):
|
7 |
+
text = text.replace('"','"')
|
8 |
+
text = text.replace(''',"''")
|
9 |
text = text.replace('&',"&")
|
10 |
result = summarizer(text,min_length=180,truncation=True)
|
11 |
return result[0]["summary_text"]
|