Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,8 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
summarizer = pipeline(task="summarization", model="t5-small")
|
5 |
-
def summarize_text(x
|
6 |
-
return summarizer(x
|
7 |
|
8 |
translator = pipeline(task="translation", model="t5-small")
|
9 |
def translate_text(x):
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
summarizer = pipeline(task="summarization", model="t5-small")
|
5 |
+
def summarize_text(x):
|
6 |
+
return summarizer(x)[0]["summary_text"]
|
7 |
|
8 |
translator = pipeline(task="translation", model="t5-small")
|
9 |
def translate_text(x):
|