Text-Summarizer / app.py
Ashish Soni
Create app.py
d76fd34
raw
history blame
325 Bytes
import gradio as gr
from transformers import pipeline
get_completion = pipeline("summarization", model="shleifer/distilbart-cnn-12-6")
def summarize(input):
output = get_completion(input)
return output[0]['summary_text']
gr.close_all()
demo = gr.Interface(fn=summarize, inputs="text", outputs="text")
demo.launch()