Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
def summarize(data): | |
summarizer = pipeline("summarization", model="t5-large") | |
output = summarizer(data, do_sample=False) | |
return output[0]["summary_text"] | |
demo = gr.Interface(fn=summarize,inputs=gr.components.Textbox(label="Text"),outputs=["text"],title="Text Summarization") | |
demo.launch() |