Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,9 @@ import gradio as gr
|
|
3 |
# Create an I18n instance with translations for multiple languages
|
4 |
i18n = gr.I18n(
|
5 |
de={"greeting": "Hallo, willkommen in meiner App!", "submit": "Absenden", "input": "Eingabe"},
|
6 |
-
en={"greeting": "Hello, welcome to my app!", "submit": "Submit", "input": "
|
7 |
-
es={"greeting": "隆Hola, bienvenido a mi aplicaci贸n!", "submit": "Enviar", "input": "Entrada
|
8 |
-
fr={"greeting": "Bonjour, bienvenue dans mon application!", "submit": "Soumettre", "input": "Entr茅e
|
9 |
)
|
10 |
|
11 |
with gr.Blocks() as demo:
|
@@ -18,4 +18,4 @@ with gr.Blocks() as demo:
|
|
18 |
submit_btn = gr.Button(i18n("submit"))
|
19 |
|
20 |
# Pass the i18n instance to the launch method
|
21 |
-
demo.launch(i18n=i18n)
|
|
|
3 |
# Create an I18n instance with translations for multiple languages
|
4 |
i18n = gr.I18n(
|
5 |
de={"greeting": "Hallo, willkommen in meiner App!", "submit": "Absenden", "input": "Eingabe"},
|
6 |
+
en={"greeting": "Hello, welcome to my app!", "submit": "Submit", "input": "Input"},
|
7 |
+
es={"greeting": "隆Hola, bienvenido a mi aplicaci贸n!", "submit": "Enviar", "input": "Entrada"},
|
8 |
+
fr={"greeting": "Bonjour, bienvenue dans mon application!", "submit": "Soumettre", "input": "Entr茅e"},
|
9 |
)
|
10 |
|
11 |
with gr.Blocks() as demo:
|
|
|
18 |
submit_btn = gr.Button(i18n("submit"))
|
19 |
|
20 |
# Pass the i18n instance to the launch method
|
21 |
+
demo.launch(i18n=i18n)
|