Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,11 +11,11 @@ def tarjim(text, choice):
|
|
11 |
except Exception as e:
|
12 |
return gr.Error("Xatolik nomi: %s" % e)
|
13 |
|
14 |
-
with gr.Blocks(theme=
|
15 |
gr.Markdown(
|
16 |
"""
|
17 |
# Tezkor tarjima!
|
18 |
-
Ma'lumotlarni tezkor tajima qilish uchun kiritish maydonini bo'sh qoldirmang
|
19 |
Hurmat bilan <a href="https://t.me/shohabbosdev">Shoh Abbos Ulug'murodov</a>
|
20 |
""")
|
21 |
with gr.Accordion(label='Deep Translator haqida...', open=False):
|
@@ -26,10 +26,12 @@ with gr.Blocks(theme='HaleyCH/HaleyCH_Theme') as demo:
|
|
26 |
with gr.Row():
|
27 |
with gr.Column():
|
28 |
tanlash = gr.Dropdown(label='Tilni tanlang', choices=GoogleTranslator().get_supported_languages(), value='uzbek')
|
29 |
-
inp = gr.Textbox(label='
|
30 |
with gr.Column():
|
31 |
out = gr.Textbox(label='Natija', show_copy_button=True)
|
|
|
32 |
inp.change(tarjim, [inp, tanlash], out)
|
|
|
33 |
|
34 |
if __name__ == "__main__":
|
35 |
-
demo.launch()
|
|
|
11 |
except Exception as e:
|
12 |
return gr.Error("Xatolik nomi: %s" % e)
|
13 |
|
14 |
+
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
15 |
gr.Markdown(
|
16 |
"""
|
17 |
# Tezkor tarjima!
|
18 |
+
Ma'lumotlarni tezkor tajima qilish uchun kiritish maydonini bo'sh qoldirmang.<br>
|
19 |
Hurmat bilan <a href="https://t.me/shohabbosdev">Shoh Abbos Ulug'murodov</a>
|
20 |
""")
|
21 |
with gr.Accordion(label='Deep Translator haqida...', open=False):
|
|
|
26 |
with gr.Row():
|
27 |
with gr.Column():
|
28 |
tanlash = gr.Dropdown(label='Tilni tanlang', choices=GoogleTranslator().get_supported_languages(), value='uzbek')
|
29 |
+
inp = gr.Textbox(label='Kirish qismi', placeholder="Tarjima mantnini kiriting..." ,autofocus=True)
|
30 |
with gr.Column():
|
31 |
out = gr.Textbox(label='Natija', show_copy_button=True)
|
32 |
+
tozalash = gr.ClearButton(value="Tozalash", variant='primary', size='sm', components=[inp, out], icon='clear-svgrepo-com.svg')
|
33 |
inp.change(tarjim, [inp, tanlash], out)
|
34 |
+
# tozalash.click(inp, out.clear)
|
35 |
|
36 |
if __name__ == "__main__":
|
37 |
+
demo.launch()
|