Skip to content

Commit b520441

Browse files
author
NeoDev
authored
Create theme loader settings
1 parent 1bc052f commit b520441

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tabs/theme_loader.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
import gradio as gr
3+
import assets.themes.loadThemes as loadThemes
4+
5+
def theme_loader():
6+
gr.Markdowm("Theme Loader for UI")
7+
themes_select = gr.Dropdown(
8+
label = "Theme",
9+
info = "Select the theme you want to use. (Requires restarting the App)",
10+
choices = loadThemes.get_list(),
11+
value = loadThemes.read_json(),
12+
visible = True
13+
)
14+
goofy_output = gr.Textbox(visible = False)
15+
themes_select.change(
16+
fn = loadThemes.select_theme,
17+
inputs = themes_select,
18+
outputs = [goofy_output]
19+
)

0 commit comments

Comments
 (0)