demomodels commited on
Commit
12deec3
·
verified ·
1 Parent(s): 001adbf

Download the model before loading it

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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):