my-ai-space / app /models /config.py
prometheus04's picture
AI Space Builder: Space content update for prometheus04/my-ai-space
fd82a77 verified
raw
history blame contribute delete
478 Bytes
import json
import Path
from pathlib import Path
class ModelConfig:
def __init__(self, json_file_path: str):
self.json_file_path = json_file_path
@classmethod
def from_json_file(cls, json_file_path: str):
with open(json_file_path, "r") as file:
config_data = json.load(file)
return cls(json_file_path)
def get_hyperparameters(self):
# implement your logic to retrieve hyperparameters from the JSON file
pass