Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,11 @@ import uuid
|
|
| 5 |
import chromadb
|
| 6 |
from chromadb.config import Settings
|
| 7 |
import httpx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Initialize FastAPI
|
| 10 |
app = FastAPI()
|
|
|
|
| 5 |
import chromadb
|
| 6 |
from chromadb.config import Settings
|
| 7 |
import httpx
|
| 8 |
+
import os
|
| 9 |
+
|
| 10 |
+
# Fix: Set custom writable Hugging Face cache directory
|
| 11 |
+
os.environ["TRANSFORMERS_CACHE"] = "/app/cache"
|
| 12 |
+
os.makedirs("/app/cache", exist_ok=True)
|
| 13 |
|
| 14 |
# Initialize FastAPI
|
| 15 |
app = FastAPI()
|