Spaces:
Running
Running
Update src/ai_processor.py
Browse files- src/ai_processor.py +3 -2
src/ai_processor.py
CHANGED
|
@@ -211,10 +211,11 @@ def load_yolo_model():
|
|
| 211 |
# Construct model with CUDA masked to avoid auto-selecting cuda:0
|
| 212 |
with _no_cuda_env():
|
| 213 |
model = YOLO(YOLO_MODEL_PATH)
|
| 214 |
-
return
|
|
|
|
| 215 |
import tensorflow as tf
|
| 216 |
load_model = _import_tf_loader()
|
| 217 |
-
return load_model(SEG_MODEL_PATH, compile=False, custom_objects={
|
| 218 |
|
| 219 |
def load_classification_pipeline():
|
| 220 |
pipe = _import_hf_cls()
|
|
|
|
| 211 |
# Construct model with CUDA masked to avoid auto-selecting cuda:0
|
| 212 |
with _no_cuda_env():
|
| 213 |
model = YOLO(YOLO_MODEL_PATH)
|
| 214 |
+
return model
|
| 215 |
+
def load_segmentation_model():
|
| 216 |
import tensorflow as tf
|
| 217 |
load_model = _import_tf_loader()
|
| 218 |
+
return load_model(SEG_MODEL_PATH, compile=False, custom_objects={'InputLayer': tf.keras.layers.InputLayer})
|
| 219 |
|
| 220 |
def load_classification_pipeline():
|
| 221 |
pipe = _import_hf_cls()
|