Spaces:
Build error
Build error
Update app.py (#2)
Browse files- Update app.py (e3282db492aa05535d257058bb3598f01aece69b)
Co-authored-by: Malik Muhammad Zubair <MalikZubair@users.noreply.huggingface.co>
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)
|