Spaces:
Build error
Build error
Update app.py
#2
by
MalikZubair - opened
app.py
CHANGED
|
@@ -32,6 +32,9 @@ summarizer = pipeline(
|
|
| 32 |
use_auth_token=token
|
| 33 |
)
|
| 34 |
|
|
|
|
|
|
|
|
|
|
| 35 |
# Text preprocessing
|
| 36 |
def preprocess_text(text):
|
| 37 |
doc = nlp(text)
|
|
|
|
| 32 |
use_auth_token=token
|
| 33 |
)
|
| 34 |
|
| 35 |
+
# Initialize spaCy globally
|
| 36 |
+
nlp = spacy.load("en_core_web_sm")
|
| 37 |
+
|
| 38 |
# Text preprocessing
|
| 39 |
def preprocess_text(text):
|
| 40 |
doc = nlp(text)
|