Spaces:
Build error
Build error
Download the model before loading it
Browse files
app.py
CHANGED
|
@@ -33,6 +33,10 @@ pipe = pipeline(
|
|
| 33 |
|
| 34 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
nlp = spacy.load("en_core_web_sm")
|
| 37 |
|
| 38 |
def summarize(text, max_length=1000):
|
|
|
|
| 33 |
|
| 34 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
| 35 |
|
| 36 |
+
# Download the 'en_core_web_sm' model
|
| 37 |
+
spacy.cli.download("en_core_web_sm")
|
| 38 |
+
|
| 39 |
+
# Load the model
|
| 40 |
nlp = spacy.load("en_core_web_sm")
|
| 41 |
|
| 42 |
def summarize(text, max_length=1000):
|