Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,10 @@ import gradio as gr
|
|
6 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
#iface.launch()
|
8 |
|
|
|
|
|
|
|
|
|
9 |
def summarize(input):
|
10 |
output = get_completion(input)
|
11 |
return output[0]['summary_text']
|
|
|
6 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
7 |
#iface.launch()
|
8 |
|
9 |
+
from transformers import pipeline
|
10 |
+
|
11 |
+
get_completion = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
|
12 |
+
|
13 |
def summarize(input):
|
14 |
output = get_completion(input)
|
15 |
return output[0]['summary_text']
|