UmeshAdabala commited on
Commit
79ea593
·
verified ·
1 Parent(s): 5f26b43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,9 +3,9 @@ from transformers import pipeline
3
 
4
  def text_summarization(text):
5
  summarizer = pipeline("summarization")
6
- summary = summarizer(text, max_length=1024, min_length=0, do_sample=False)
7
  return summary[0]['summary_text']
8
- description_text = "Welcome to the Paragraph Summarization Tool! Enter the paragraph you want to summarize and please don't enter paragraph exceeding 1024 charcaters. I thank the user for spending his most valuable time to use this tool 🙏 "
9
  iface = gr.Interface(fn=text_summarization, inputs="text", outputs="text", title = "Paragraph Summarizer ", description=description_text)
10
 
11
  iface.launch(share=True)
 
3
 
4
  def text_summarization(text):
5
  summarizer = pipeline("summarization")
6
+ summary = summarizer(text, max_length=1024, min_length=100, do_sample=False)
7
  return summary[0]['summary_text']
8
+ 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 🙏 "
9
  iface = gr.Interface(fn=text_summarization, inputs="text", outputs="text", title = "Paragraph Summarizer ", description=description_text)
10
 
11
  iface.launch(share=True)