Spaces:
Sleeping
Sleeping
Brunwo
commited on
Commit
•
ca9c82e
1
Parent(s):
6bfae79
chore: comment out unused dropdown and related code in app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ import gettext
|
|
25 |
|
26 |
from gradio.themes.utils.theme_dropdown import create_theme_dropdown
|
27 |
|
28 |
-
dropdown, js = create_theme_dropdown()
|
29 |
|
30 |
# Setup gettext
|
31 |
def setup_translation(lang_code):
|
@@ -128,6 +128,9 @@ def update_instructions_language(lang):
|
|
128 |
"prelude": _("podcast.prelude"),
|
129 |
"dialog": _("podcast.dialog"),
|
130 |
}
|
|
|
|
|
|
|
131 |
return (
|
132 |
INSTRUCTION_TEMPLATES["podcast"]["intro"],
|
133 |
INSTRUCTION_TEMPLATES["podcast"]["text_instructions"],
|
@@ -404,10 +407,10 @@ with gr.Blocks(theme='lone17/kotaemon', title="Text to Audio") as demo:
|
|
404 |
)
|
405 |
with gr.Column(scale=3):
|
406 |
with gr.Group():
|
407 |
-
dropdown.render()
|
408 |
toggle_dark = gr.Button(value="Toggle Dark")
|
409 |
|
410 |
-
dropdown.change(None, dropdown, None, js=js)
|
411 |
toggle_dark.click(
|
412 |
None,
|
413 |
js="""
|
@@ -420,8 +423,8 @@ with gr.Blocks(theme='lone17/kotaemon', title="Text to Audio") as demo:
|
|
420 |
#add language selection, trigger a reload
|
421 |
lang = gr.Dropdown(
|
422 |
label="Language",
|
423 |
-
choices=["
|
424 |
-
value="
|
425 |
info="Select the language for the interface.",
|
426 |
)
|
427 |
|
|
|
25 |
|
26 |
from gradio.themes.utils.theme_dropdown import create_theme_dropdown
|
27 |
|
28 |
+
#dropdown, js = create_theme_dropdown()
|
29 |
|
30 |
# Setup gettext
|
31 |
def setup_translation(lang_code):
|
|
|
128 |
"prelude": _("podcast.prelude"),
|
129 |
"dialog": _("podcast.dialog"),
|
130 |
}
|
131 |
+
|
132 |
+
print(INSTRUCTION_TEMPLATES["podcast"]["intro"])
|
133 |
+
|
134 |
return (
|
135 |
INSTRUCTION_TEMPLATES["podcast"]["intro"],
|
136 |
INSTRUCTION_TEMPLATES["podcast"]["text_instructions"],
|
|
|
407 |
)
|
408 |
with gr.Column(scale=3):
|
409 |
with gr.Group():
|
410 |
+
#dropdown.render()
|
411 |
toggle_dark = gr.Button(value="Toggle Dark")
|
412 |
|
413 |
+
#dropdown.change(None, dropdown, None, js=js)
|
414 |
toggle_dark.click(
|
415 |
None,
|
416 |
js="""
|
|
|
423 |
#add language selection, trigger a reload
|
424 |
lang = gr.Dropdown(
|
425 |
label="Language",
|
426 |
+
choices=["en", "fr"],
|
427 |
+
value="en",
|
428 |
info="Select the language for the interface.",
|
429 |
)
|
430 |
|