This commit is contained in:
Adrian Gunnar Lauterer 2024-09-08 03:05:41 +02:00
parent 9876606788
commit 0cf96459e7
Signed by: adriangl
GPG Key ID: D33368A59745C2F0
1 changed files with 9 additions and 9 deletions

View File

@ -9,8 +9,8 @@ import os
ozai_url = 'http://localhost:8000/api/' ozai_url = 'http://localhost:8000/api/'
ozai_webui_host = '0.0.0.0' ozai_webui_host = '0.0.0.0'
ozai_webui_port = 5000 ozai_webui_port = 5000
#static_folder = '../static' static_folder = '../static'
#template_folder = '../templates' template_folder = '../templates'
#check if the environment variables are set #check if the environment variables are set
if os.getenv('OZAI_URL') is not None: 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')) ozai_webui_port = int(os.getenv('OZAI_WEBUI_PORT'))
if os.getenv('OZAI_WEBUI_SECRET_KEY') is not None: if os.getenv('OZAI_WEBUI_SECRET_KEY') is not None:
app.config['OZAI_WEBUI_SECRET_KEY'] = os.getenv('OZAI_WEBUI_SECRET_KEY') app.config['OZAI_WEBUI_SECRET_KEY'] = os.getenv('OZAI_WEBUI_SECRET_KEY')
#if os.getenv('OZAI_WEBUI_STATIC_FOLDER') is not None: if os.getenv('OZAI_WEBUI_STATIC_FOLDER') is not None:
# static_folder = os.getenv('OZAI_WEBUI_STATIC_FOLDER') static_folder = os.getenv('OZAI_WEBUI_STATIC_FOLDER')
#if os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') is not None: if os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') is not None:
# template_folder = os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER') template_folder = os.getenv('OZAI_WEBUI_TEMPLATE_FOLDER')
print(f"using host { ozai_webui_host }") print(f"using host { ozai_webui_host }")
print(f"using port { ozai_webui_port }") print(f"using port { ozai_webui_port }")
print(f"using ozai url { ozai_url }") print(f"using ozai url { ozai_url }")
#print(f"using template folder { template_folder }") print(f"using template folder { template_folder }")
#print(f"using static folder { static_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) socketio = SocketIO(app)
app.config['SECRET_KEY'] = "secret" app.config['SECRET_KEY'] = "secret"