Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,10 @@ load_dotenv()
|
|
16 |
app = FastAPI()
|
17 |
|
18 |
os.environ["HF_HOME"] = "/tmp/huggingface_cache"
|
|
|
|
|
|
|
|
|
19 |
|
20 |
# Ensure the cache directory exists
|
21 |
cache_dir = os.environ["HF_HOME"]
|
|
|
16 |
app = FastAPI()
|
17 |
|
18 |
os.environ["HF_HOME"] = "/tmp/huggingface_cache"
|
19 |
+
# Ensure the cache directory exists
|
20 |
+
cache_dir = os.environ["TRANSFORMERS_CACHE"]
|
21 |
+
if not os.path.exists(cache_dir):
|
22 |
+
os.makedirs(cache_dir)
|
23 |
|
24 |
# Ensure the cache directory exists
|
25 |
cache_dir = os.environ["HF_HOME"]
|