diff --git a/application/app.py b/application/app.py index ae6199749..e646ffbee 100644 --- a/application/app.py +++ b/application/app.py @@ -40,5 +40,5 @@ def after_request(response): return response if __name__ == "__main__": - app.run(debug=True, port=7091) + app.run(debug=settings.FLASK_DEBUG_MODE, port=7091) diff --git a/application/core/settings.py b/application/core/settings.py index 0e1909e69..7eac3cb45 100644 --- a/application/core/settings.py +++ b/application/core/settings.py @@ -59,6 +59,8 @@ class Settings(BaseSettings): QDRANT_PATH: Optional[str] = None QDRANT_DISTANCE_FUNC: str = "Cosine" + FLASK_DEBUG_MODE: bool = False + path = Path(__file__).parent.parent.absolute() settings = Settings(_env_file=path.joinpath(".env"), _env_file_encoding="utf-8")