Spaces:
Paused
Paused
Update backend/main.py
Browse files- backend/main.py +3 -0
backend/main.py
CHANGED
@@ -81,6 +81,9 @@ uri = os.environ['MONGODB_URI']
|
|
81 |
# Read connection string from .env file
|
82 |
# uri = config['MONGODB_URI']
|
83 |
|
|
|
|
|
|
|
84 |
# MongoDB Connection Lifespan Events
|
85 |
@asynccontextmanager
|
86 |
async def lifespan(app: FastAPI):
|
|
|
81 |
# Read connection string from .env file
|
82 |
# uri = config['MONGODB_URI']
|
83 |
|
84 |
+
# Set transformers cache
|
85 |
+
os.environ['HF_HOME'] = 'cache/'
|
86 |
+
|
87 |
# MongoDB Connection Lifespan Events
|
88 |
@asynccontextmanager
|
89 |
async def lifespan(app: FastAPI):
|