Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import torch
|
|
| 5 |
from transformers import pipeline
|
| 6 |
import gradio as gr
|
| 7 |
|
| 8 |
-
model_path = "models--sshleifer--distilbart-cnn-12-6/snapshots/a4f8f3ea906ed274767e9906dbaede7531d660ff"
|
| 9 |
-
text_summary = pipeline("summarization", model=
|
| 10 |
|
| 11 |
# Code Generated by Sidekick is for learning and experimentation purposes only.
|
| 12 |
def summary(input_text, max_chunk_length=800):
|
|
|
|
| 5 |
from transformers import pipeline
|
| 6 |
import gradio as gr
|
| 7 |
|
| 8 |
+
# model_path = "models--sshleifer--distilbart-cnn-12-6/snapshots/a4f8f3ea906ed274767e9906dbaede7531d660ff"
|
| 9 |
+
text_summary = pipeline("summarization", model="sshleifer/distilbart-cnn-12-6", torch_dtype=torch.bfloat16)
|
| 10 |
|
| 11 |
# Code Generated by Sidekick is for learning and experimentation purposes only.
|
| 12 |
def summary(input_text, max_chunk_length=800):
|