modified: app.py

This commit is contained in:
SimolZimol
2026-05-22 16:48:25 +02:00
parent 9df6c67a29
commit 8bc1952a46

5
app.py
View File

@@ -15,11 +15,6 @@ def create_app(config_class=Config):
# Ensure required directories exist # Ensure required directories exist
os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True) os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True)
os.makedirs(app.config["VECTORDB_PATH"], 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 # Extensions
db.init_app(app) db.init_app(app)