ahmadalfian commited on
Commit
db8a6f1
·
verified ·
1 Parent(s): ad07365

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -13,7 +13,7 @@ try:
13
  except ImportError:
14
  YOLO_AVAILABLE = False
15
 
16
- st.set_page_config(page_title="Pengenalan Gambar Mineral")
17
 
18
  # Periksa apakah library YOLO tersedia
19
  def cek_library():
@@ -32,7 +32,7 @@ st.markdown("""
32
 
33
  # Pastikan library sudah terpasang sebelum melanjutkan
34
  if cek_library():
35
- uploaded_file = st.file_uploader("Upload gambar mineral", type=['jpg', 'jpeg', 'png'])
36
 
37
  if uploaded_file:
38
  temp_dir = tempfile.mkdtemp()
@@ -62,11 +62,11 @@ if cek_library():
62
  fig, ax = plt.subplots()
63
  ax.bar(list(nama_objek.values()), nilai_prediksi)
64
  ax.set_title('Tingkat Keyakinan Prediksi')
65
- ax.set_xlabel('Mineral')
66
  ax.set_ylabel('Keyakinan')
67
  plt.xticks(rotation=45)
68
 
69
- st.success(f"Mineral terdeteksi: {objek_terdeteksi}")
70
  st.pyplot(fig)
71
 
72
  except Exception as e:
 
13
  except ImportError:
14
  YOLO_AVAILABLE = False
15
 
16
+ st.set_page_config(page_title="Betta Classifier")
17
 
18
  # Periksa apakah library YOLO tersedia
19
  def cek_library():
 
32
 
33
  # Pastikan library sudah terpasang sebelum melanjutkan
34
  if cek_library():
35
+ uploaded_file = st.file_uploader("Upload gambar ikan cupang", type=['jpg', 'jpeg', 'png'])
36
 
37
  if uploaded_file:
38
  temp_dir = tempfile.mkdtemp()
 
62
  fig, ax = plt.subplots()
63
  ax.bar(list(nama_objek.values()), nilai_prediksi)
64
  ax.set_title('Tingkat Keyakinan Prediksi')
65
+ ax.set_xlabel('Betta')
66
  ax.set_ylabel('Keyakinan')
67
  plt.xticks(rotation=45)
68
 
69
+ st.success(f"Betta terdeteksi: {objek_terdeteksi}")
70
  st.pyplot(fig)
71
 
72
  except Exception as e: