wanderkid commited on
Commit
1320fad
1 Parent(s): 3cf595b

fix infer bug

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -101,6 +101,8 @@ def recognize_image(input_img, model_type):
101
  model = model_small.to(device)
102
  else:
103
  model = model_tiny.to(device)
 
 
104
 
105
  if len(input_img.shape) == 3:
106
  input_img = input_img[:, :, ::-1].copy()
 
101
  model = model_small.to(device)
102
  else:
103
  model = model_tiny.to(device)
104
+
105
+ model.eval()
106
 
107
  if len(input_img.shape) == 3:
108
  input_img = input_img[:, :, ::-1].copy()