Spaces:
Running
Running
Download utils.py from DeepImagix/self-trained2: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/spaces/DeepImagix/self-trained2/resolve/main/utils.py
- Command line
-
hf download hf://spaces/DeepImagix/self-trained2/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/DeepImagix/self-trained2/resolve/main/utils.py
452 Bytes
| import os | |
| USER_MODELS_DIR = "/data/user_models_data" | |
| os.makedirs(USER_MODELS_DIR, exist_ok=True) | |
| def get_ai_paths(ai_id: str = "neurones_self"): | |
| ai_dir = os.path.join(USER_MODELS_DIR, ai_id) | |
| os.makedirs(ai_dir, exist_ok=True) | |
| return { | |
| "model_path": os.path.join(ai_dir, "matcher_model.joblib"), | |
| "data_path": os.path.join(ai_dir, "training_pairs.csv"), | |
| "responses_path": os.path.join(ai_dir, "responses.json") | |
| } |