Spaces:
Running
on
Zero
Running
on
Zero
fix infer bug
Browse files
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()
|