Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
summarizer = pipeline("summarization", model="t5-base", tokenizer="t5-base", truncation=True, framework="tf") | |
def translate(text): | |
results = summarizer(text, min_length=180, truncation = True) | |
return results | |
iface = gr.Interface( | |
fn=translate, | |
inputs = "text", | |
outputs = "text", | |
) | |
iface.launch() |