File size: 628 Bytes
4ce68d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""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()