Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -48,17 +48,17 @@ css = """
|
|
48 |
"""
|
49 |
|
50 |
with gr.Blocks(css=css) as demo:
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
|
63 |
-
|
64 |
demo.queue(concurrency_count=64, max_size=80, api_open=False).launch(max_threads=256)
|
|
|
48 |
"""
|
49 |
|
50 |
with gr.Blocks(css=css) as demo:
|
51 |
+
with gr.Tabs() as tabs:
|
52 |
+
with gr.Tab("Переводчик", id='t'):
|
53 |
+
with gr.Row():
|
54 |
+
with gr.Column(scale=6, min_width=600):
|
55 |
+
text = gr.Textbox(label="Введите текст"),
|
56 |
+
target_language = gr.Dropdown(languages, value="Английский", label="Выберите язык для перевода")
|
57 |
+
with gr.Column(scale=6, min_width=600):
|
58 |
+
with gr.Column():
|
59 |
+
text_button = gr.Button("Перевести", variant='primary', elem_id="generate")
|
60 |
+
with gr.Column(scale=2):
|
61 |
+
text_output = gr.Textbox(label="Переведенный текст")
|
62 |
|
63 |
+
text_button.click(t, inputs=[text, target_language], outputs=text_output)
|
64 |
demo.queue(concurrency_count=64, max_size=80, api_open=False).launch(max_threads=256)
|