Spaces:
Paused
Paused
from transformers import pipeline | |
import gradio as gr | |
summarizer= pipeline("summarization", model="facebook/bart-large-cnn", framework="tf", truncation=True) | |
def summarize(text): | |
result= summarizer(text, truncation=True, min_length=30, max_length=130) | |
return result[0]["summary_text"] | |
iface= gr.Interface( | |
fn= summarize, | |
inputs= gr.inputs.Textbox(lines=10, placeholder="please put your text here"), | |
outputs="text" | |
) | |
iface.launch() |