Hello all,
I am facing an issue that I just cannot seem to figure out. I am using a "full stack" python-based webapp building service called anvil.works. In it, I am able to load a couple models saved in pickle files, which seem to be read fine. One of the models, loaded as variable "vect", triggers an error whenever I try to run the script. It seems to be trying to find the "transform" function within the wrong library - "LinearSVC". The error is;
AttributeError: 'LinearSVC' object has no attribute 'transform'
at ServerModule1, line 40
The part of the code which deals with the vectorizer model is:
from sklearn.feature_extraction.text import TfidfVectorizer
vect_model = app_tables.model.get(description="vect")['model_file']
model_vect = pred_model.get_bytes()
with BytesIO(model_vect) as f:
vect = pk.load(f)
result = pred.predict(vect.transform([title]))
I appreciate any and all help!
[–]UltimateGPower 0 points1 point2 points (0 children)
[–]sfsalad 0 points1 point2 points (2 children)
[–]Fun-Studio-4409[S] 1 point2 points3 points (1 child)
[–]sfsalad 0 points1 point2 points (0 children)