ashutoshzade commited on
Commit
2cce74e
1 Parent(s): 7d51c2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,11 +1,12 @@
1
  import gradio as gr
 
2
 
3
  get_completion = pipeline("summarization", model="shleifer/distilbart-cnn-12-6")
4
 
5
  def summarize(input):
6
  output = get_completion(input)
7
  return output[0]['summary_text']
8
-
9
- iface = gr.Interface(fn=summarize, inputs="input", outputs="text")
10
- iface.launch()
11
 
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
 
4
  get_completion = pipeline("summarization", model="shleifer/distilbart-cnn-12-6")
5
 
6
  def summarize(input):
7
  output = get_completion(input)
8
  return output[0]['summary_text']
9
+
10
+ demo = gr.Interface(fn=summarize, inputs="text", outputs="text")
11
+ demo.launch()
12