Spaces:
Runtime error
Runtime error
Commit ·
2633210
1
Parent(s): 315a6c8
Update app.py
Browse files29 unmodified lines30313233343536373839404142434445464729 unmodified linesuploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])if uploaded_image is not None:# Read the image from uploaded fileimage = Image.open(uploaded_image)# Display the uploaded imagest.image(image, caption='Uploaded Image.', use_column_width=True)# Preprocess the imageprobs = process_image(image)# Display the resultst.subheader("Result")st.json(probs.tolist())if __name__ == '__main__':main()29 unmodified lines303132333435363738394041424344454647484929 unmodified linesuploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])if uploaded_image is not None:# Read the image from the uploaded fileimage = Image.open(uploaded_image)# Display the uploaded imagest.image(image, caption='Uploaded Image.', use_column_width=True)# Preprocess the imagetry:probs = process_image(image)# Display the resultst.subheader("Result")st.json(probs.tolist())except Exception as e:st.error(f"Error processing image: {e}")if __name__ == '__main__':main()
app.py+8-6