I’m trying to upload trained models saved on github using pickle / joblib, but I’m not able to do it on streamlit cloud
This is certainly possible to use serialized/trained models (pickle/joblib) with Streamlit Community Cloud.
Next, the model is loaded:
model = pickle.load(open('data/oversampling_PubChem_RandomForestClassifier.pkl', 'rb'))
And finally the model is used to make predictions via:
Thanks @dataprofessor you’re right, my mistake was in building the serialized file.
This solution works for me:
with open(‘LR_classifier.pkl’, ‘wb’) as pickle_out:
serialized_classifier = pickle.dumps(LR_classifier)
with open(‘./data/LR_classifier.pkl’, ‘rb’) as pickle_in:
LR_classifier = pickle.load(pickle_in)
You’re welcome, Glad to hear that it works now!
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.