GwFirman commited on
Commit
3abfce1
·
verified ·
1 Parent(s): 72185a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ import cv2
6
  import matplotlib.pyplot as plt
7
 
8
  # Konfigurasi model
9
- MODEL_PATH = "model.pt" # Pastikan model ada di direktori ini
10
  CLASS_NAMES = ["bag", "person-static-object"] # Sesuaikan dengan kelas Anda
11
 
12
  # Fungsi untuk memuat model
@@ -46,7 +46,7 @@ uploaded_file = st.file_uploader("Pilih gambar...", type=["jpg", "png", "jpeg"])
46
  if uploaded_file is not None:
47
  # Memuat gambar
48
  image = Image.open(uploaded_file).convert("RGB")
49
- st.image(image, caption="Gambar Input", use_column_width=True)
50
 
51
  # Proses deteksi
52
  if st.button("Deteksi Objek"):
 
6
  import matplotlib.pyplot as plt
7
 
8
  # Konfigurasi model
9
+ MODEL_PATH = "best.pt" # Pastikan model ada di direktori ini
10
  CLASS_NAMES = ["bag", "person-static-object"] # Sesuaikan dengan kelas Anda
11
 
12
  # Fungsi untuk memuat model
 
46
  if uploaded_file is not None:
47
  # Memuat gambar
48
  image = Image.open(uploaded_file).convert("RGB")
49
+ st.image(image, caption="Gambar Input", use_container_width=True)
50
 
51
  # Proses deteksi
52
  if st.button("Deteksi Objek"):