I’m using st.file_uploader widget to upload an image but it always outputs nonetype
here’s my code:
st.write("Upload the Image of Person to Register them in DataBase") uploaded_file = st.file_uploader("Upload image", type=['jpeg', 'png', 'jpg', 'webp']) if uploaded_file is not None: file_bytes = np.asarray(bytearray(uploaded_file.read()), dtype=np.uint8) image = cv2.imdecode(file_bytes, 1)
The program exits as the output is nonetype.
How can i fix this issue.
*one more point,in the same app, i’m using another instance of st.file_uploader and it’s working fine but the second instance is outputting nonetype