lawrence722 commited on
Commit
4282693
1 Parent(s): 4353525

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -60,7 +60,7 @@ def detect_modify(img0, model, conf=0.4, imgsz=640, conf_thres = 0.25, iou_thres
60
 
61
 
62
  # Get names and colors
63
- names = model.module.names if hasattr(models 'module') else model.names
64
  colors = [[random.randint(0, 255) for _ in range(3)] for _ in names]
65
 
66
  # Run inference
 
60
 
61
 
62
  # Get names and colors
63
+ names = model.module.names if hasattr(model, 'module') else model.names
64
  colors = [[random.randint(0, 255) for _ in range(3)] for _ in names]
65
 
66
  # Run inference