kabita-choudhary commited on
Commit
a520813
1 Parent(s): 129e7b8

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+ def summarize(data):
4
+ summarizer = pipeline("summarization", model="t5-large")
5
+ output = summarizer(data, do_sample=False)
6
+ return output[0]["summary_text"]
7
+ demo = gr.Interface(fn=summarize,inputs=gr.components.Textbox(label="Text"),outputs=["text"],title="Text Summarization")
8
+ demo.launch()