UmeshAdabala's picture
Update app.py
79ea593 verified
raw
history blame contribute delete
693 Bytes
import gradio as gr
from transformers import pipeline
def text_summarization(text):
summarizer = pipeline("summarization")
summary = summarizer(text, max_length=1024, min_length=100, do_sample=False)
return summary[0]['summary_text']
description_text = "Welcome to the Paragraph Summarization Tool! Enter the paragraph you want to summarize and please don't enter paragraph exceeding 1024 charcaters and also shorther than 100 characters. I thank the user for spending his most valuable time to use this tool 🙏 "
iface = gr.Interface(fn=text_summarization, inputs="text", outputs="text", title = "Paragraph Summarizer ", description=description_text)
iface.launch(share=True)