Spaces:
Running
Running
| """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() |