AyushDey commited on
Commit
9de1457
1 Parent(s): fbcbcc2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- pipe = pipeline('summarization', model='facebook/bart-large-cnn')
5
 
6
  def summary(input):
7
  value = pipe(input)
8
  return value[0]['summary_text']
9
- a = gr.Interface(fn=summary, inputs= 'text', outputs = 'text', title = 'Text Summarizer')
10
  a.launch()
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ pipe = pipeline('summarization')
5
 
6
  def summary(input):
7
  value = pipe(input)
8
  return value[0]['summary_text']
9
+ a = gr.Interface(fn=summary, inputs= gr.Textbox(lines=5 label='Enter Text'), outputs = gr.Textbox(label='Summary'), title = 'Text Summarizer')
10
  a.launch()