Rooni commited on
Commit
0fb54d9
·
1 Parent(s): 6c412ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -48,17 +48,17 @@ css = """
48
  """
49
 
50
  with gr.Blocks(css=css) as demo:
51
-
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(inputs=[text, target_language], outputs=text_output)
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)