Vishaltiwari2019 commited on
Commit
2a40bee
·
verified ·
1 Parent(s): ab0b71e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ def detect_objects(image):
26
  draw.rectangle(box, outline=color, width=3)
27
  label_text = f"{model.config.id2label[label.item()]}: {round(score.item(), 2)}"
28
  # Larger and bolder font
29
- draw.text((box[0], box[1]), label_text, fill=color, font=ImageFont.truetype("arial.ttf", size=20))
30
 
31
  return image
32
 
 
26
  draw.rectangle(box, outline=color, width=3)
27
  label_text = f"{model.config.id2label[label.item()]}: {round(score.item(), 2)}"
28
  # Larger and bolder font
29
+ draw.text((box[0], box[1]), label_text, fill=color,)
30
 
31
  return image
32