Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "png", "jpeg
|
|
56 |
if uploaded_file:
|
57 |
# Read and display the image
|
58 |
image = Image.open(uploaded_file)
|
59 |
-
st.image(image, caption="Uploaded Image",
|
60 |
|
61 |
# Perform prediction
|
62 |
with st.spinner("Processing..."):
|
@@ -67,6 +67,6 @@ if uploaded_file:
|
|
67 |
iou=overlap_threshold, # Set overlap (IoU) threshold
|
68 |
)
|
69 |
st.write("Detection Results:")
|
70 |
-
st.image(results[0].plot(), caption="Detections",
|
71 |
except Exception as e:
|
72 |
st.error(f"Error during prediction: {e}")
|
|
|
56 |
if uploaded_file:
|
57 |
# Read and display the image
|
58 |
image = Image.open(uploaded_file)
|
59 |
+
st.image(image, caption="Uploaded Image", use_container_width=True)
|
60 |
|
61 |
# Perform prediction
|
62 |
with st.spinner("Processing..."):
|
|
|
67 |
iou=overlap_threshold, # Set overlap (IoU) threshold
|
68 |
)
|
69 |
st.write("Detection Results:")
|
70 |
+
st.image(results[0].plot(), caption="Detections", use_container_width=True)
|
71 |
except Exception as e:
|
72 |
st.error(f"Error during prediction: {e}")
|