Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,12 @@ from nltk import sent_tokenize
|
|
13 |
from typing import List, Tuple
|
14 |
from transformers import AutoModel, AutoTokenizer
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
# Ensure nltk sentence tokenizer is downloaded
|
17 |
nltk.download('punkt')
|
18 |
|
|
|
13 |
from typing import List, Tuple
|
14 |
from transformers import AutoModel, AutoTokenizer
|
15 |
|
16 |
+
import spacy
|
17 |
+
spacy.cli.download("en_core_web_sm") # Ensure the model is available
|
18 |
+
nlp = spacy.load("en_core_web_sm") # Load the model
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
# Ensure nltk sentence tokenizer is downloaded
|
23 |
nltk.download('punkt')
|
24 |
|