Spaces:
Runtime error
Runtime error
valentynliubchenko
commited on
Commit
·
2b9ca25
1
Parent(s):
2ee677b
fixed input parameters
Browse files
app.py
CHANGED
|
@@ -12,13 +12,12 @@ models = [YOLO(os.path.join("./saved_model", option)) for option in model_option
|
|
| 12 |
print("finish preparation")
|
| 13 |
|
| 14 |
def process_image(input_image, model_name, conf):
|
| 15 |
-
print('input_image: ')
|
| 16 |
-
print(input_image)
|
| 17 |
-
print('model_name: ')
|
| 18 |
-
print(model_name)
|
| 19 |
-
print('conf: ')
|
| 20 |
-
print(conf)
|
| 21 |
print('start processing: ')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
if model_name is None:
|
| 24 |
model_name = model_names[0]
|
|
|
|
| 12 |
print("finish preparation")
|
| 13 |
|
| 14 |
def process_image(input_image, model_name, conf):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
print('start processing: ')
|
| 16 |
+
if input_image is None:
|
| 17 |
+
return None, "No objects detected."
|
| 18 |
+
|
| 19 |
+
print(f"model_name : {model_name}")
|
| 20 |
+
print(f"conf : {conf}")
|
| 21 |
|
| 22 |
if model_name is None:
|
| 23 |
model_name = model_names[0]
|