Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline('summarization') | |
def summary(input): | |
value = pipe(input) | |
return value[0]['summary_text'] | |
a = gr.Interface(fn=summary, | |
inputs= gr.Textbox(lines=5, label='Enter Text'), | |
outputs = gr.Textbox(label='Summary'), | |
title = 'Text Summarizer') | |
a.launch(inline=False) |