Spaces:
Sleeping
Sleeping
Update app.py
Browse filesRemoved Labels Part From the UI
app.py
CHANGED
|
@@ -26,12 +26,6 @@ if model_files:
|
|
| 26 |
else:
|
| 27 |
st.error("β No .pt file found in the unzipped model folder.")
|
| 28 |
|
| 29 |
-
# Define corrected labels
|
| 30 |
-
corrected_labels = {
|
| 31 |
-
0: "Fake",
|
| 32 |
-
1: "Real"
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
# Upload image
|
| 36 |
uploaded_image = st.file_uploader("π Upload an Image", type=["jpg", "jpeg", "png"])
|
| 37 |
|
|
@@ -51,6 +45,5 @@ if uploaded_image is not None:
|
|
| 51 |
result_pil = Image.fromarray(result_image[..., ::-1]) # BGR to RGB
|
| 52 |
st.image(result_pil, caption="Detection Result", width=200)
|
| 53 |
|
| 54 |
-
#
|
| 55 |
-
st.
|
| 56 |
-
st.json(corrected_labels)
|
|
|
|
| 26 |
else:
|
| 27 |
st.error("β No .pt file found in the unzipped model folder.")
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Upload image
|
| 30 |
uploaded_image = st.file_uploader("π Upload an Image", type=["jpg", "jpeg", "png"])
|
| 31 |
|
|
|
|
| 45 |
result_pil = Image.fromarray(result_image[..., ::-1]) # BGR to RGB
|
| 46 |
st.image(result_pil, caption="Detection Result", width=200)
|
| 47 |
|
| 48 |
+
# Removed label display line π
|
| 49 |
+
# st.write("π Detected Labels:", results[0].names)
|
|
|