Spaces:
Sleeping
Sleeping
Make cache examples False
Browse files
app.py
CHANGED
@@ -1,35 +1,36 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from backend.german_polish import polish_to_german_translation
|
3 |
-
|
4 |
-
#Each interface will have on input text and one output text
|
5 |
-
polish_to_german_examples = [
|
6 |
-
["Warszawa"], # Warsaw
|
7 |
-
["Krak贸w"], # Krakow
|
8 |
-
["Gda艅sk"], # Gdansk
|
9 |
-
["Wroc艂aw"], # Breslau
|
10 |
-
["Pozna艅"], # Posen
|
11 |
-
["艁贸d藕"], # Lodz
|
12 |
-
["Szczecin"], # Stettin
|
13 |
-
["Bydgoszcz"], # Bromberg
|
14 |
-
["Lublin"], # Lublin
|
15 |
-
["Katowice"], # Kattowitz
|
16 |
-
]
|
17 |
-
|
18 |
-
german_polish_interface = gr.Interface(
|
19 |
-
fn=polish_to_german_translation,
|
20 |
-
inputs=gr.Textbox(label="Polish Text"),
|
21 |
-
outputs=gr.Textbox(label="German Translation"),
|
22 |
-
title="Polish to German Translator",
|
23 |
-
description="Translate Polish toponym to German.",
|
24 |
-
examples=polish_to_german_examples,
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
[
|
33 |
-
|
34 |
-
|
|
|
35 |
tabbed_interface.launch(share=False)
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from backend.german_polish import polish_to_german_translation
|
3 |
+
|
4 |
+
#Each interface will have on input text and one output text
|
5 |
+
polish_to_german_examples = [
|
6 |
+
["Warszawa"], # Warsaw
|
7 |
+
["Krak贸w"], # Krakow
|
8 |
+
["Gda艅sk"], # Gdansk
|
9 |
+
["Wroc艂aw"], # Breslau
|
10 |
+
["Pozna艅"], # Posen
|
11 |
+
["艁贸d藕"], # Lodz
|
12 |
+
["Szczecin"], # Stettin
|
13 |
+
["Bydgoszcz"], # Bromberg
|
14 |
+
["Lublin"], # Lublin
|
15 |
+
["Katowice"], # Kattowitz
|
16 |
+
]
|
17 |
+
|
18 |
+
german_polish_interface = gr.Interface(
|
19 |
+
fn=polish_to_german_translation,
|
20 |
+
inputs=gr.Textbox(label="Polish Text"),
|
21 |
+
outputs=gr.Textbox(label="German Translation"),
|
22 |
+
title="Polish to German Translator",
|
23 |
+
description="Translate Polish toponym to German.",
|
24 |
+
examples=polish_to_german_examples,
|
25 |
+
cache_examples=False
|
26 |
+
)
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
tabbed_interface = gr.TabbedInterface(
|
32 |
+
[german_polish_interface],
|
33 |
+
["Polish to German Translator"],
|
34 |
+
)
|
35 |
+
|
36 |
tabbed_interface.launch(share=False)
|