Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from backend.german_polish import polish_to_german_translation | |
| #Each interface will have on input text and one output text | |
| polish_to_german_examples = [ | |
| ["Warszawa"], # Warsaw | |
| ["Krak贸w"], # Krakow | |
| ["Gda艅sk"], # Gdansk | |
| ["Wroc艂aw"], # Breslau | |
| ["Pozna艅"], # Posen | |
| ["艁贸d藕"], # Lodz | |
| ["Szczecin"], # Stettin | |
| ["Bydgoszcz"], # Bromberg | |
| ["Lublin"], # Lublin | |
| ["Katowice"], # Kattowitz | |
| ] | |
| german_polish_interface = gr.Interface( | |
| fn=polish_to_german_translation, | |
| inputs=gr.Textbox(label="Polish Text"), | |
| outputs=gr.Textbox(label="German Translation"), | |
| title="Polish to German Translator", | |
| description="Translate Polish toponym to German.", | |
| examples=polish_to_german_examples, | |
| cache_examples=False | |
| ) | |
| tabbed_interface = gr.TabbedInterface( | |
| [german_polish_interface], | |
| ["Polish to German Translator"], | |
| ) | |
| tabbed_interface.launch(share=False) |