Spaces:
Sleeping
Sleeping
Debugging code.
Browse files
app.py
CHANGED
|
@@ -10,12 +10,14 @@ nltk.download('stopwords')
|
|
| 10 |
from sklearn.feature_extraction.text import CountVectorizer
|
| 11 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 12 |
|
|
|
|
|
|
|
| 13 |
# file name
|
| 14 |
#lr_filename = 'logistic_regression.pkl'
|
| 15 |
-
|
| 16 |
|
| 17 |
# Load model from pickle file
|
| 18 |
-
model = pickle.load(open(lr_filename, 'rb'))
|
| 19 |
|
| 20 |
|
| 21 |
# Process input text, including removing stopwords, converting to lowercase, and removing punctuation
|
|
|
|
| 10 |
from sklearn.feature_extraction.text import CountVectorizer
|
| 11 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
| 12 |
|
| 13 |
+
from transformers import pipeline
|
| 14 |
+
|
| 15 |
# file name
|
| 16 |
#lr_filename = 'logistic_regression.pkl'
|
| 17 |
+
model = pipeline("sentiment-analysis", model="scikit-learn/skorch-text-classification")
|
| 18 |
|
| 19 |
# Load model from pickle file
|
| 20 |
+
# model = pickle.load(open(lr_filename, 'rb'))
|
| 21 |
|
| 22 |
|
| 23 |
# Process input text, including removing stopwords, converting to lowercase, and removing punctuation
|