We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c94128 commit 1b27b29Copy full SHA for 1b27b29
1 file changed
src/shared/shared.py
@@ -91,19 +91,6 @@ def load_model():
91
if classifier is None:
92
logger.info("DEFAULT MODEL: " + default_model_name)
93
94
- cache_root = os.environ.get(
95
- "HF_HOME", os.path.expanduser("~/.cache/huggingface")
96
- )
97
- model_cache_name = default_model_name.replace("/", "--")
98
- cache_path = f"{cache_root}/hub/models--{model_cache_name}"
99
- cache_exists = os.path.exists(cache_path)
100
-
101
- if cache_exists:
102
- logger.info("Model found in cache, deleting and redownloading")
103
- shutil.rmtree(cache_path)
104
- else:
105
- logger.info("Model not found in cache, will download")
106
107
classifier = pipeline(
108
"image-classification",
109
model=default_model_name,
0 commit comments