From b5d0df90b9a2682c4faba10d7f2f10d8fe2bf5b5 Mon Sep 17 00:00:00 2001 From: Emerson Gomes Date: Fri, 13 Dec 2024 20:29:02 -0600 Subject: [PATCH] Remove hardcoded root path for HF models --- backend/model_server/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/model_server/main.py b/backend/model_server/main.py index 2864af324d..8f151508da 100644 --- a/backend/model_server/main.py +++ b/backend/model_server/main.py @@ -27,8 +27,8 @@ from shared_configs.configs import SENTRY_DSN os.environ["TOKENIZERS_PARALLELISM"] = "false" os.environ["HF_HUB_DISABLE_TELEMETRY"] = "1" -HF_CACHE_PATH = Path("/root/.cache/huggingface/") -TEMP_HF_CACHE_PATH = Path("/root/.cache/temp_huggingface/") +HF_CACHE_PATH = Path(os.path.expanduser("~")) / ".cache/huggingface" +TEMP_HF_CACHE_PATH = Path(os.path.expanduser("~")) / ".cache/temp_huggingface" transformer_logging.set_verbosity_error()