Skip to content

Commit efc0f67

Browse files
ensure trained_model is a Path before calling .suffix (#471)
1 parent 95abb3b commit efc0f67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cellfinder/core/classify/classify.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
from datetime import datetime
3+
from pathlib import Path
34
from typing import Any, Callable, Dict, List, Optional, Tuple
45

56
import keras
@@ -68,7 +69,7 @@ def main(
6869
workers=workers,
6970
)
7071

71-
if trained_model and trained_model.suffix == ".h5":
72+
if trained_model and Path(trained_model).suffix == ".h5":
7273
print(
7374
"Weights provided in place of the model, "
7475
"loading weights into default model."

0 commit comments

Comments
 (0)