Spaces:
Sleeping
Sleeping
Download common.py from horaizon27/fhe_aging_pace: direct link, hf CLI and curl.
- Browser
- Download file 682 Bytes
-
https://huggingface.co/spaces/horaizon27/fhe_aging_pace/resolve/main/common.py
- Command line
-
hf download hf://spaces/horaizon27/fhe_aging_pace/common.py
-
curl -L -o common.py https://huggingface.co/spaces/horaizon27/fhe_aging_pace/resolve/main/common.py
682 Bytes
| from pathlib import Path | |
| ROOT_DIR = Path(__file__).parent | |
| KEYS_PATH = ROOT_DIR / ".fhe_keys" | |
| CLIENT_TMP_PATH = ROOT_DIR / "client_tmp" | |
| SERVER_TMP_PATH = ROOT_DIR / "server_tmp" | |
| EXAMPLES_PATH = ROOT_DIR / "examples" | |
| DUNEDIN_PACE_DATA_PATH = ROOT_DIR / "dunedin_pace_data.json" | |
| KEYS_PATH.mkdir(exist_ok=True) | |
| CLIENT_TMP_PATH.mkdir(exist_ok=True) | |
| SERVER_TMP_PATH.mkdir(exist_ok=True) | |
| CSV_EXAMPLES = [str(file) for file in EXAMPLES_PATH.glob("**/*")] | |
| SERVER_URL = "http://localhost:8000" | |
| SCALE = 100000 | |
| def get_tmp_file_path(user_id, file_name, type="client"): | |
| tmp_path = SERVER_TMP_PATH if type == "server" else CLIENT_TMP_PATH | |
| return tmp_path / f"{user_id}_{file_name}" |