Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,11 @@ from transformers import pipeline
|
|
8 |
pipe = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6",
|
9 |
torch_dtype=torch.bfloat16)
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
gr.close_all()
|
17 |
|
18 |
# simple gradio web app
|
|
|
8 |
pipe = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6",
|
9 |
torch_dtype=torch.bfloat16)
|
10 |
|
11 |
+
def summary(input):
|
12 |
+
output = text_summary(input)
|
13 |
+
return output[0]['summary_text']
|
14 |
+
|
15 |
+
|
16 |
gr.close_all()
|
17 |
|
18 |
# simple gradio web app
|