Spaces:
Sleeping
Sleeping
ashutoshzade
commited on
Commit
•
7d51c2e
1
Parent(s):
3f6eb92
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|