Spaces:
Running
Running
Using an HF classification model for testing.
Browse files
app.py
CHANGED
@@ -11,11 +11,13 @@ 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 |
# Load model from pickle file
|
17 |
model = pickle.load(open(lr_filename, 'rb'))
|
18 |
|
|
|
19 |
# Process input text, including removing stopwords, converting to lowercase, and removing punctuation
|
20 |
stop = stopwords.words('english')
|
21 |
def process_text(text):
|
|
|
11 |
from sklearn.feature_extraction.text import TfidfVectorizer
|
12 |
|
13 |
# file name
|
14 |
+
#lr_filename = 'logistic_regression.pkl'
|
15 |
+
lr_filename = 'skops-tests/textclassification-sklearn-latest-logistic_regression-with-config-pickle'
|
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
|
22 |
stop = stopwords.words('english')
|
23 |
def process_text(text):
|