Spaces:
Runtime error
Runtime error
solve cache path
Browse files
main.py
CHANGED
|
@@ -6,9 +6,9 @@ from fastapi import FastAPI, File, UploadFile, HTTPException
|
|
| 6 |
from fastapi.responses import JSONResponse
|
| 7 |
|
| 8 |
import os
|
| 9 |
-
from os import path
|
| 10 |
# cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
| 11 |
-
cache_path = "~/
|
| 12 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
| 13 |
os.environ["HF_HUB_CACHE"] = cache_path
|
| 14 |
os.environ["HF_HOME"] = cache_path
|
|
|
|
| 6 |
from fastapi.responses import JSONResponse
|
| 7 |
|
| 8 |
import os
|
| 9 |
+
# from os import path
|
| 10 |
# cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
| 11 |
+
cache_path = "~/.cache/huggingface"
|
| 12 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
| 13 |
os.environ["HF_HUB_CACHE"] = cache_path
|
| 14 |
os.environ["HF_HOME"] = cache_path
|