Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -70,6 +70,7 @@ from PyPDF2 import PdfReader
|
|
70 |
from huggingface_hub import HfApi
|
71 |
import io
|
72 |
from datasets import load_dataset
|
|
|
73 |
|
74 |
# from huggingface_hub import Repository
|
75 |
# from git import repo
|
@@ -171,7 +172,8 @@ def main():
|
|
171 |
count_vect = CountVectorizer(ngram_range=[1,3])
|
172 |
tfidf_transformer=TfidfTransformer()
|
173 |
loaded_model = pickle.load(open(filename, 'rb'))
|
174 |
-
loaded_vectorizer =
|
|
|
175 |
|
176 |
pipeline_test_output = loaded_vectorizer.transform(class_list)
|
177 |
predicted = loaded_model.predict(pipeline_test_output)
|
|
|
70 |
from huggingface_hub import HfApi
|
71 |
import io
|
72 |
from datasets import load_dataset
|
73 |
+
import dill
|
74 |
|
75 |
# from huggingface_hub import Repository
|
76 |
# from git import repo
|
|
|
172 |
count_vect = CountVectorizer(ngram_range=[1,3])
|
173 |
tfidf_transformer=TfidfTransformer()
|
174 |
loaded_model = pickle.load(open(filename, 'rb'))
|
175 |
+
loaded_vectorizer = dill.load(open('vectorizefile_classification.pickle', 'rb'))
|
176 |
+
#loaded_vectorizer = pickle.load(open('vectorizefile_classification.pickle', 'rb'))
|
177 |
|
178 |
pipeline_test_output = loaded_vectorizer.transform(class_list)
|
179 |
predicted = loaded_model.predict(pipeline_test_output)
|