chatui-helper / test_themes.py
milwright
add language learner template and test themes functionality
4ce68d1
raw
history blame
628 Bytes
"""Test theme dropdown functionality"""
import gradio as gr
from utils import AVAILABLE_THEMES
print("Available themes:", list(AVAILABLE_THEMES.keys()))
with gr.Blocks() as demo:
gr.Markdown("# Theme Dropdown Test")
theme_dropdown = gr.Dropdown(
label="Select Theme",
choices=list(AVAILABLE_THEMES.keys()),
value="Default",
interactive=True
)
output = gr.Textbox(label="Selected Theme")
theme_dropdown.change(
lambda x: f"You selected: {x}",
inputs=[theme_dropdown],
outputs=[output]
)
if __name__ == "__main__":
demo.launch()