Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,13 +58,8 @@ for model in models:
|
|
| 58 |
def inference(images, min_score, model_name):
|
| 59 |
results = []
|
| 60 |
for image in images:
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
im = np.frombuffer(r.content, dtype="uint8")
|
| 64 |
-
im = cv2.imdecode(im, cv2.IMREAD_COLOR_BGR2RGB)
|
| 65 |
-
else:
|
| 66 |
-
# Model expect BGR!
|
| 67 |
-
im = image[:,:,::-1]
|
| 68 |
|
| 69 |
model_id = model_name_to_id[model_name]
|
| 70 |
|
|
|
|
| 58 |
def inference(images, min_score, model_name):
|
| 59 |
results = []
|
| 60 |
for image in images:
|
| 61 |
+
|
| 62 |
+
im = cv2.imread(image)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
model_id = model_name_to_id[model_name]
|
| 65 |
|