File size: 798 Bytes
2693299
 
 
 
 
 
 
 
 
 
 
1a7d583
2693299
 
 
 
 
 
 
 
 
 
 
1a7d583
 
 
2693299
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
import os
import sys
import base64
import pathlib
import tempfile
import gradio as gr

from assets.i18n.i18n import I18nAuto
import assets.themes.loadThemes as loadThemes

now_dir = os.getcwd()
sys.path.append(now_dir)

i18n = I18nAuto()


def theme_tab():
    with gr.Row():
        with gr.Column():
            themes_select = gr.Dropdown(
                loadThemes.get_list(),
                value=loadThemes.read_json(),
                label=i18n("Theme"),
                info=i18n(
                    "Select the theme you want to use. (Requires restarting Applio)"
                ),
                visible=True,
            )
            themes_select.change(
                fn=loadThemes.select_theme,
                inputs=themes_select,
                outputs=[],
            )