Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,10 +47,9 @@ def load_models_from_hub():
|
|
| 47 |
print(f"Downloading landmark predictor model...")
|
| 48 |
lp_path = hf_hub_download(repo_id=MODEL_REPO_ID, filename="trained_models/Ocular_LM_Generator.pth")
|
| 49 |
|
| 50 |
-
# Load config file
|
| 51 |
-
print("Loading configuration...")
|
| 52 |
-
|
| 53 |
-
with open(config_path, 'r') as f:
|
| 54 |
config = yaml.safe_load(f)
|
| 55 |
|
| 56 |
model_cfg = config['model']
|
|
|
|
| 47 |
print(f"Downloading landmark predictor model...")
|
| 48 |
lp_path = hf_hub_download(repo_id=MODEL_REPO_ID, filename="trained_models/Ocular_LM_Generator.pth")
|
| 49 |
|
| 50 |
+
# Load config file (use local file from Space)
|
| 51 |
+
print("Loading configuration from local file...")
|
| 52 |
+
with open('config/config.yaml', 'r') as f:
|
|
|
|
| 53 |
config = yaml.safe_load(f)
|
| 54 |
|
| 55 |
model_cfg = config['model']
|