modified: app.py
This commit is contained in:
5
app.py
5
app.py
@@ -15,11 +15,6 @@ def create_app(config_class=Config):
|
||||
# Ensure required directories exist
|
||||
os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True)
|
||||
os.makedirs(app.config["VECTORDB_PATH"], exist_ok=True)
|
||||
os.makedirs(app.config["TRANSFORMERS_CACHE"], exist_ok=True)
|
||||
|
||||
# Set HuggingFace cache env so sentence-transformers respects it
|
||||
os.environ["TRANSFORMERS_CACHE"] = app.config["TRANSFORMERS_CACHE"]
|
||||
os.environ["HF_HOME"] = app.config["TRANSFORMERS_CACHE"]
|
||||
|
||||
# Extensions
|
||||
db.init_app(app)
|
||||
|
||||
Reference in New Issue
Block a user