Spaces:
Build error
Build error
Commit
·
48d6983
1
Parent(s):
6cadcce
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
get_completion = pipeline("summarization", model="
|
| 5 |
|
| 6 |
def summarize(input):
|
| 7 |
output = get_completion(input)
|
|
@@ -11,6 +11,6 @@ demo = gr.Interface(fn=summarize,
|
|
| 11 |
inputs=[gr.Textbox(label="Text to summarize", lines=6)],
|
| 12 |
outputs=[gr.Textbox(label="Result", lines=3)],
|
| 13 |
title="Text summarization with distilbart-cnn",
|
| 14 |
-
description="Summarize any text using the `
|
| 15 |
)
|
| 16 |
demo.launch(share=True)
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
get_completion = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6")
|
| 5 |
|
| 6 |
def summarize(input):
|
| 7 |
output = get_completion(input)
|
|
|
|
| 11 |
inputs=[gr.Textbox(label="Text to summarize", lines=6)],
|
| 12 |
outputs=[gr.Textbox(label="Result", lines=3)],
|
| 13 |
title="Text summarization with distilbart-cnn",
|
| 14 |
+
description="Summarize any text using the `sshleifer/distilbart-cnn-12-6` model under the hood!"
|
| 15 |
)
|
| 16 |
demo.launch(share=True)
|