File size: 389 Bytes
5677497
7e8974e
 
9de1457
7e8974e
 
 
 
07e6078
 
 
 
4bc305b
1
2
3
4
5
6
7
8
9
10
11
12
13
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)