ashutoshzade commited on
Commit
7d51c2e
1 Parent(s): 3f6eb92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import gradio as gr
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
 
 
 
 
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
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