muhammadsalmanalfaridzi commited on
Commit
94f96f8
·
verified ·
1 Parent(s): fc758d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,7 +16,7 @@ def detect_objects(image):
16
  temp_file_path = temp_file.name
17
 
18
  # Lakukan prediksi pada gambar
19
- predictions = model.predict(temp_file_path, confidence=70, overlap=80).json()
20
 
21
  # Menghitung jumlah objek per kelas
22
  class_count = {}
@@ -39,7 +39,7 @@ def detect_objects(image):
39
  result_text += f"\nTotal Product Nestle: {total_count}"
40
 
41
  # Menyimpan gambar dengan prediksi
42
- output_image = model.predict(temp_file_path, confidence=70, overlap=80).save("/tmp/prediction.jpg")
43
 
44
  # Hapus file sementara setelah prediksi
45
  os.remove(temp_file_path)
 
16
  temp_file_path = temp_file.name
17
 
18
  # Lakukan prediksi pada gambar
19
+ predictions = model.predict(temp_file_path, confidence=60, overlap=80).json()
20
 
21
  # Menghitung jumlah objek per kelas
22
  class_count = {}
 
39
  result_text += f"\nTotal Product Nestle: {total_count}"
40
 
41
  # Menyimpan gambar dengan prediksi
42
+ output_image = model.predict(temp_file_path, confidence=60, overlap=80).save("/tmp/prediction.jpg")
43
 
44
  # Hapus file sementara setelah prediksi
45
  os.remove(temp_file_path)