My app is running locally, and I’m trying to pass in a numpy array as an argument into a callback for a button. For context:
uploaded_img = np.asarray(Image.open(BytesIO(uploaded_img.getvalue())))
and so when I do something like:
st.button(UPLOAD_CHOICE_STR, on_click=_predict, args=uploaded_img)
it throws the aforementioned error. I’m not doing anything with the array inside the callback, for ex nothing of the sort: “if uploaded_img == 4” so I’m not exactly sure what the issue is and would appreciate any help.
Thanks!