Spaces:
Runtime error
Runtime error
tawounfouet
commited on
Commit
•
91c143d
1
Parent(s):
4db1489
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-small", truncation=True, framework="tf")
|
5 |
+
|
6 |
+
def translate(text):
|
7 |
+
text = text.replace('"', '"')
|
8 |
+
|
9 |
+
return result[0]["summary_text"]
|