lamini-ai / llm-classifier

Classify data instantly using an LLM
Other
215 stars 20 forks source link

AttributeError: 'LaminiClassifier' object has no attribute 'logistic_regression' #2

Open SarahWei0804 opened 6 months ago

SarahWei0804 commented 6 months ago

I loaded my trained laminiclassifier and I got the error that the classifier don't have the attribute, logistic regression. Is there anyone know how to handle this problem. I've encountered it several times. Should I need to input api key from Lamini as well?

My code is shown below.

from lamini import LaminiClassifier
import lamini
lamini_clf = LaminiClassifier.load("my_model.lamini")
lamini_clf = LaminiClassifier(lamini_clf)
lamini_clf.predict(data)

image

Thanks for your attention.

gabirayman commented 5 months ago

I had the same issue, I looked and found that when you save your model, save it with: lamini_clf.save_local("my_model.lamini") instead of: lamini_clf.save("my_model.lamini")