Spaces:
Sleeping
Sleeping
ashutoshzade
commited on
Commit
•
2cce74e
1
Parent(s):
7d51c2e
Update app.py
Browse files
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 |
-
|
10 |
-
|
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 |
|