Skip to content

Fix duplicate logo in Gradio app#19

Merged
jonasscheid merged 3 commits into
mainfrom
fix/gui-duplicate-logo
Jun 9, 2026
Merged

Fix duplicate logo in Gradio app#19
jonasscheid merged 3 commits into
mainfrom
fix/gui-duplicate-logo

Conversation

@jonasscheid

Copy link
Copy Markdown
Contributor

Problem

The Gradio app rendered both the light and dark logos at once (visible in the header). This happened on any launch path that doesn't go through the CLI main() — e.g. the HF Space — because the show/hide CSS (and theme) were passed only to app.launch().

Fix

Moved the theme-aware logo-swap CSS into an inline <style> block inside the header gr.HTML, so it travels with the component and applies on every launch path (CLI, HF Space, programmatic). Removed the now-redundant css= from launch().

Validation

Verified with Playwright + headless Chromium on both launch paths (CLI entrypoint and bare create_interface().launch()): exactly one correct logo per mode — logo-light in light mode, logo-dark in dark mode.

@jonasscheid jonasscheid merged commit 045d46a into main Jun 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants