From 0cf96459e7c128377e7164d0357e89cdc79c5733 Mon Sep 17 00:00:00 2001 From: Adrian Gunnar Lauterer Date: Sun, 8 Sep 2024 03:05:41 +0200 Subject: [PATCH] test2 --- src/ozai_webui/__init__.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ozai_webui/__init__.py b/src/ozai_webui/__init__.py index e6cab9d..a50a012 100755 --- a/src/ozai_webui/__init__.py +++ b/src/ozai_webui/__init__.py @@ -9,8 +9,8 @@ import os ozai_url = 'http://localhost:8000/api/' ozai_webui_host = '0.0.0.0' ozai_webui_port = 5000 -#static_folder = '../static' -#template_folder = '../templates' +static_folder = '../static' +template_folder = '../templates' #check if the environment variables are set if os.getenv('OZAI_URL') is not None: @@ -21,19 +21,19 @@ if os.getenv('OZAI_WEBUI_PORT') is not None: ozai_webui_port = int(os.getenv('OZAI_WEBUI_PORT')) if os.getenv('OZAI_WEBUI_SECRET_KEY') is not None: app.config['OZAI_WEBUI_SECRET_KEY'] = os.getenv('OZAI_WEBUI_SECRET_KEY') -#if os.getenv('OZAI_WEBUI_STATIC_FOLDER') is not None: -# static_folder = os.getenv('OZAI_WEBUI_STATIC_FOLDER') -#if os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') is not None: -# template_folder = os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') +if os.getenv('OZAI_WEBUI_STATIC_FOLDER') is not None: + static_folder = os.getenv('OZAI_WEBUI_STATIC_FOLDER') +if os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') is not None: + template_folder = os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') print(f"using host { ozai_webui_host }") print(f"using port { ozai_webui_port }") print(f"using ozai url { ozai_url }") -#print(f"using template folder { template_folder }") -#print(f"using static folder { static_folder }") +print(f"using template folder { template_folder }") +print(f"using static folder { static_folder }") -app = Flask(__name__,template_folder="../templates",static_folder="../static" ) +app = Flask(__name__,template_folder=template_folder,static_folder=static_folder ) socketio = SocketIO(app) app.config['SECRET_KEY'] = "secret"