check for model too

This commit is contained in:
Logan Garrett 2025-03-17 22:52:32 -04:00
parent bf99a0dd90
commit 12a2e61711

View File

@ -177,8 +177,9 @@ def config(request: Request):
# Add model plus data if plus is enabled
if config["plus"]["enabled"]:
if "path" in config["model"]:
model_json_path = FilePath(config["model"]["path"]).with_suffix(".json")
model_path = config.get("model", {}).get("path")
if model_path:
model_json_path = FilePath(model_path).with_suffix(".json")
try:
with open(model_json_path, "r") as f:
model_plus_data = json.load(f)