Spaces:
Runtime error
Runtime error
Update utils/model_loader.py
Browse files- utils/model_loader.py +1 -1
utils/model_loader.py
CHANGED
|
@@ -57,7 +57,7 @@ def load_pytorch_model(build_fn, weights_path, device):
|
|
| 57 |
def load_keras_model(weights_path):
|
| 58 |
if not os.path.exists(weights_path):
|
| 59 |
raise FileNotFoundError(f"Model not found: {weights_path}")
|
| 60 |
-
return tf.keras.models.load_model(weights_path)
|
| 61 |
|
| 62 |
def load_all_models():
|
| 63 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
|
| 57 |
def load_keras_model(weights_path):
|
| 58 |
if not os.path.exists(weights_path):
|
| 59 |
raise FileNotFoundError(f"Model not found: {weights_path}")
|
| 60 |
+
return tf.keras.models.load_model(weights_path, compile=False)
|
| 61 |
|
| 62 |
def load_all_models():
|
| 63 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|