space-demo / app.py
rashmikamath01's picture
Update app.py
3a59162
raw
history blame
441 Bytes
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= gr.inputs.Textbox(lines=10, placeholder = "Enter text to summarize ... "),
outputs = "text"
)
iface.launch()