Spaces:
Build error
Build error
fixed file path
Browse files- src/main.py +5 -5
src/main.py
CHANGED
|
@@ -53,14 +53,14 @@ class GenericPredictor:
|
|
| 53 |
def __init__(self, model_dir: Path, property_name: str):
|
| 54 |
self.property_name = property_name
|
| 55 |
|
| 56 |
-
|
| 57 |
-
model_path =
|
| 58 |
-
selector_path =
|
| 59 |
|
| 60 |
if not model_path.exists():
|
| 61 |
-
raise FileNotFoundError(f"Missing model.joblib in {
|
| 62 |
if not selector_path.exists():
|
| 63 |
-
raise FileNotFoundError(f"Missing selector.joblib in {
|
| 64 |
|
| 65 |
self.model = joblib.load(model_path)
|
| 66 |
self.selector = FeatureSelector.load(selector_path)
|
|
|
|
| 53 |
def __init__(self, model_dir: Path, property_name: str):
|
| 54 |
self.property_name = property_name
|
| 55 |
|
| 56 |
+
|
| 57 |
+
model_path = model_dir / "model.joblib"
|
| 58 |
+
selector_path = model_dir / "selector.joblib"
|
| 59 |
|
| 60 |
if not model_path.exists():
|
| 61 |
+
raise FileNotFoundError(f"Missing model.joblib in {model_dir}")
|
| 62 |
if not selector_path.exists():
|
| 63 |
+
raise FileNotFoundError(f"Missing selector.joblib in {model_dir}")
|
| 64 |
|
| 65 |
self.model = joblib.load(model_path)
|
| 66 |
self.selector = FeatureSelector.load(selector_path)
|