Use URL-based logos, env-based WebGUI title, apstrom.ca link, update README
Mirror and run GitLab CI / build (push) Has been cancelled
Ruff / ruff (push) Has been cancelled

This commit is contained in:
admin
2026-06-14 15:35:16 +00:00
parent fb1dc3324d
commit dc20e9cff0
5 changed files with 129 additions and 36 deletions
+9 -7
View File
@@ -82,15 +82,19 @@ def create_app():
# Paths for assets
header_path = layout_cfg.get("header", "/app/src/misc/header.html")
footer_path = layout_cfg.get("footer", "/app/src/misc/footer.html")
logo_path = layout_cfg.get("logo", "/app/src/misc/logo.png")
# Prepare header HTML with logo
# Configurable title and logo URL via environment
webui_title = os.getenv("WEBUI_TITLE", "A.P.Strom Transcription")
logo_url = os.getenv("WEBUI_LOGO_URL", "https://apstrom.ca")
# Prepare header HTML with logo URL
header_html = ""
if os.path.exists(header_path):
header_html = load_html_template(
header_path,
header_logo_url="https://www.apstrom.de/",
header_logo_src=logo_path if os.path.exists(logo_path) else "",
webui_title=webui_title,
header_logo_url=logo_url,
header_logo_src=logo_url,
)
# Prepare footer HTML
@@ -104,7 +108,7 @@ def create_app():
# Build Gradio interface
with gr.Blocks(
title="A.P.Strom Transcription",
title=webui_title,
) as app:
# Header
@@ -247,12 +251,10 @@ def create_app():
# Launch options
server_name = launch_cfg.get("server_name", os.getenv("GRADIO_SERVER_NAME", "0.0.0.0"))
server_port = launch_cfg.get("server_port", 7860)
favicon_path = logo_path if os.path.exists(logo_path) else None
app.launch(
server_name=str(server_name),
server_port=int(server_port),
favicon_path=favicon_path,
css="body { font-family: Arial, sans-serif; }",
)