dramp77 commited on
Commit
abf9556
·
verified ·
1 Parent(s): 3c8c43d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ def detect_objects(image):
26
 
27
  try:
28
  # Lakukan prediksi pada gambar
29
- predictions = model.predict(temp_file_path, confidence=55, overlap=80).json()
30
 
31
  # Menghitung jumlah objek per kelas
32
  class_count = {}
@@ -45,7 +45,7 @@ def detect_objects(image):
45
 
46
  # Menyimpan gambar dengan prediksi
47
  output_image_path = "/tmp/prediction.jpg"
48
- model.predict(temp_file_path, confidence=55, overlap=80).save(output_image_path)
49
 
50
  except requests.exceptions.HTTPError as http_err:
51
  # Menangani kesalahan HTTP
 
26
 
27
  try:
28
  # Lakukan prediksi pada gambar
29
+ predictions = model.predict(temp_file_path, confidence=60, overlap=80).json()
30
 
31
  # Menghitung jumlah objek per kelas
32
  class_count = {}
 
45
 
46
  # Menyimpan gambar dengan prediksi
47
  output_image_path = "/tmp/prediction.jpg"
48
+ model.predict(temp_file_path, confidence=60, overlap=80).save(output_image_path)
49
 
50
  except requests.exceptions.HTTPError as http_err:
51
  # Menangani kesalahan HTTP