Spaces:
Runtime error
Runtime error
jaifar530
commited on
fix spacy
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ import requests
|
|
| 11 |
import pickle
|
| 12 |
import pandas as pd
|
| 13 |
import nltk
|
| 14 |
-
import spacy
|
| 15 |
from nltk.corpus import stopwords
|
| 16 |
from nltk.tokenize import word_tokenize, sent_tokenize
|
| 17 |
import numpy as np
|
|
@@ -40,6 +40,16 @@ with open('RandomForestClassifier.pkl', 'rb') as file:
|
|
| 40 |
|
| 41 |
|
| 42 |
# Loading a SpaCy model for Named Entity Recognition and Lemmatization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
nlp = spacy.load('en_core_web_sm')
|
| 44 |
|
| 45 |
# # Your input paragraph
|
|
|
|
| 11 |
import pickle
|
| 12 |
import pandas as pd
|
| 13 |
import nltk
|
| 14 |
+
# import spacy
|
| 15 |
from nltk.corpus import stopwords
|
| 16 |
from nltk.tokenize import word_tokenize, sent_tokenize
|
| 17 |
import numpy as np
|
|
|
|
| 40 |
|
| 41 |
|
| 42 |
# Loading a SpaCy model for Named Entity Recognition and Lemmatization
|
| 43 |
+
!pip install https://huggingface.co/spacy/en_core_web_sm/resolve/main/en_core_web_sm-any-py3-none-any.whl
|
| 44 |
+
|
| 45 |
+
# Using spacy.load().
|
| 46 |
+
import spacy
|
| 47 |
+
nlp = spacy.load("en_core_web_sm")
|
| 48 |
+
|
| 49 |
+
# # Importing as module.
|
| 50 |
+
# import en_core_web_sm
|
| 51 |
+
# nlp = en_core_web_sm.load()
|
| 52 |
+
|
| 53 |
nlp = spacy.load('en_core_web_sm')
|
| 54 |
|
| 55 |
# # Your input paragraph
|