yonikremer
commited on
Commit
·
bdded84
1
Parent(s):
7be248a
BUGFIX: models_dir was set to the wrong value
Browse files- hanlde_form_submit.py +1 -1
hanlde_form_submit.py
CHANGED
@@ -14,7 +14,7 @@ def is_downloaded(model_name: str) -> bool:
|
|
14 |
:param model_name: The name of the model to check.
|
15 |
:return: True if the model is downloaded, False otherwise.
|
16 |
"""
|
17 |
-
models_dir = "
|
18 |
model_dir = os.path.join(models_dir, f"models--{model_name.replace('/', '--')}")
|
19 |
return os.path.isdir(model_dir)
|
20 |
|
|
|
14 |
:param model_name: The name of the model to check.
|
15 |
:return: True if the model is downloaded, False otherwise.
|
16 |
"""
|
17 |
+
models_dir = os.path.join(os.path.expanduser("~"), ".cache", "huggingface", "hub")
|
18 |
model_dir = os.path.join(models_dir, f"models--{model_name.replace('/', '--')}")
|
19 |
return os.path.isdir(model_dir)
|
20 |
|