Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Move the language selection button to the bottom
Browse files
app.py
CHANGED
@@ -516,15 +516,6 @@ def update_language(language: str) -> gr.Markdown:
|
|
516 |
|
517 |
|
518 |
with gr.Blocks(css=custom_css, css_paths="style.css", theme=gr.themes.Base()) as demo:
|
519 |
-
with gr.Row(elem_classes="language-switch-container"):
|
520 |
-
language = gr.Dropdown(
|
521 |
-
choices=["π―π΅ JP", "πΊπΈ EN"],
|
522 |
-
value="π―π΅ JP",
|
523 |
-
elem_classes="language-selector",
|
524 |
-
show_label=False,
|
525 |
-
container=False,
|
526 |
-
)
|
527 |
-
|
528 |
gr.HTML(TITLE)
|
529 |
introduction_text = gr.Markdown(INTRODUCTION_TEXT_JP, elem_classes="markdown-text")
|
530 |
|
@@ -549,6 +540,14 @@ with gr.Blocks(css=custom_css, css_paths="style.css", theme=gr.themes.Base()) as
|
|
549 |
)
|
550 |
gr.HTML(BOTTOM_LOGO)
|
551 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
demo.load(fn=set_default_language, outputs=language)
|
553 |
language.change(
|
554 |
fn=update_language,
|
@@ -557,7 +556,6 @@ with gr.Blocks(css=custom_css, css_paths="style.css", theme=gr.themes.Base()) as
|
|
557 |
api_name=False,
|
558 |
)
|
559 |
|
560 |
-
|
561 |
if __name__ == "__main__":
|
562 |
if os.getenv("SPACE_ID"):
|
563 |
scheduler = BackgroundScheduler()
|
|
|
516 |
|
517 |
|
518 |
with gr.Blocks(css=custom_css, css_paths="style.css", theme=gr.themes.Base()) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
gr.HTML(TITLE)
|
520 |
introduction_text = gr.Markdown(INTRODUCTION_TEXT_JP, elem_classes="markdown-text")
|
521 |
|
|
|
540 |
)
|
541 |
gr.HTML(BOTTOM_LOGO)
|
542 |
|
543 |
+
language = gr.Dropdown(
|
544 |
+
choices=["π―π΅ JP", "πΊπΈ EN"],
|
545 |
+
value="π―π΅ JP",
|
546 |
+
elem_classes="language-selector",
|
547 |
+
show_label=False,
|
548 |
+
container=False,
|
549 |
+
)
|
550 |
+
|
551 |
demo.load(fn=set_default_language, outputs=language)
|
552 |
language.change(
|
553 |
fn=update_language,
|
|
|
556 |
api_name=False,
|
557 |
)
|
558 |
|
|
|
559 |
if __name__ == "__main__":
|
560 |
if os.getenv("SPACE_ID"):
|
561 |
scheduler = BackgroundScheduler()
|
style.css
CHANGED
@@ -1,7 +1,3 @@
|
|
1 |
.language-selector {
|
2 |
-
position: absolute;
|
3 |
-
top: 10px;
|
4 |
-
right: 10px;
|
5 |
-
z-index: 1000;
|
6 |
width: auto;
|
7 |
}
|
|
|
1 |
.language-selector {
|
|
|
|
|
|
|
|
|
2 |
width: auto;
|
3 |
}
|