eldavid commited on
Commit
0a76a69
1 Parent(s): 8530f80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ def detect_people(image):
23
  num_pessoas = 0
24
 
25
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
26
- if score > 0.9 and model.config.id2label[label.item()] == "person":
27
  box = box.tolist()
28
  draw.rectangle(box, outline="red", width=3)
29
  num_pessoas += 1
@@ -40,4 +40,4 @@ iface = gr.Interface(
40
  )
41
 
42
  # Executar a aplicação
43
- iface.launch()
 
23
  num_pessoas = 0
24
 
25
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
26
+ if score > 0.7 and model.config.id2label[label.item()] == "person": # Ajustar o limiar para 0.7
27
  box = box.tolist()
28
  draw.rectangle(box, outline="red", width=3)
29
  num_pessoas += 1
 
40
  )
41
 
42
  # Executar a aplicação
43
+ iface.launch()