Force creation of utility files inline when in Hugging Face cache directory
Browse files- adapter.py +7 -0
adapter.py
CHANGED
|
@@ -401,6 +401,13 @@ def ensure_utility_files_available():
|
|
| 401 |
'/tmp/ablang2', # Temporary directory
|
| 402 |
]
|
| 403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
# Also try to find files in the Hugging Face cache structure
|
| 405 |
cache_dir = os.path.dirname(current_dir)
|
| 406 |
if 'huggingface' in cache_dir:
|
|
|
|
| 401 |
'/tmp/ablang2', # Temporary directory
|
| 402 |
]
|
| 403 |
|
| 404 |
+
# Check if we're in a Hugging Face cache directory
|
| 405 |
+
is_hf_cache = 'huggingface' in current_dir and 'cache' in current_dir
|
| 406 |
+
if is_hf_cache:
|
| 407 |
+
print("🔍 Detected Hugging Face cache directory - will create utility files inline")
|
| 408 |
+
# Skip searching other paths and create files inline
|
| 409 |
+
possible_paths = []
|
| 410 |
+
|
| 411 |
# Also try to find files in the Hugging Face cache structure
|
| 412 |
cache_dir = os.path.dirname(current_dir)
|
| 413 |
if 'huggingface' in cache_dir:
|