UnpicklingError: invalid load key, 'v'

uploaded the pickle file model using git-lfs because the fill is too big, but when i try to load in program i found this error
image
thank you for your help
-python version is 3.8.7
-streamlit version is 0.82.0

Hi @Roy_Noviantho,

Thank you for sharing with the Streamlit community! Would you be able to either post a code snippet which contains your usage of “pickle” or a link to your app?

Best,

Caroline

hi @Caroline,
this is my code when load pickle:

vectorizer = pickle.load(open('data/vectorizer6.pkl', 'rb'))     *
model = pickle.load(open('data/model6.pkl', 'rb'))*   

i tried with model size <= 25mb and perfectly can load the model
but when i tried with the mode size >= 25mb which is upload with git lfs, get error UnpicklingError: invalid load key, ‘v’

Hi @Roy_Noviantho,

I would recommend using Git LFS for the larger file.

You might also want to check out these relevant threads:

Best,

Caroline

1 Like