SSD0907 commited on
Commit
2c8b0af
Β·
verified Β·
1 Parent(s): 9363d50

Update app.py

Browse files

Removed Labels Part From the UI

Files changed (1) hide show
  1. app.py +2 -9
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
- # Show corrected label info
55
- st.subheader("πŸ”Ž Detected Labels:")
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)