Irpan
commited on
Commit
·
5c46deb
1
Parent(s):
4ca6037
app
Browse files
app.py
CHANGED
@@ -23,31 +23,28 @@ with gr.Blocks() as app:
|
|
23 |
label="2. Enter Uyghur Text in Chosen Script (or Click a Button Below to Generate Text)",
|
24 |
placeholder="Enter Uyghur text here...",
|
25 |
)
|
26 |
-
# Add buttons for generating short and long texts
|
27 |
with gr.Row():
|
28 |
generate_short_btn = gr.Button("Generate Short Text")
|
29 |
generate_long_btn = gr.Button("Generate Long Text")
|
30 |
# Translations
|
31 |
with gr.Group():
|
32 |
with gr.Row():
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
36 |
)
|
37 |
-
|
38 |
with gr.Row():
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
value="english",
|
44 |
-
interactive=True
|
45 |
-
)
|
46 |
-
translate_btn = gr.Button("Translate")
|
47 |
# TTS
|
48 |
with gr.Group():
|
49 |
with gr.Row():
|
50 |
-
example_audio = gr.Audio(label="(Optional) Generate AI Pronunciation
|
51 |
with gr.Row():
|
52 |
tts_btn = gr.Button("Generate AI Pronunciation")
|
53 |
# ASR
|
|
|
23 |
label="2. Enter Uyghur Text in Chosen Script (or Click a Button Below to Generate Text)",
|
24 |
placeholder="Enter Uyghur text here...",
|
25 |
)
|
|
|
26 |
with gr.Row():
|
27 |
generate_short_btn = gr.Button("Generate Short Text")
|
28 |
generate_long_btn = gr.Button("Generate Long Text")
|
29 |
# Translations
|
30 |
with gr.Group():
|
31 |
with gr.Row():
|
32 |
+
translate_choice = gr.Dropdown(
|
33 |
+
choices=util.translation_choices,
|
34 |
+
label="(Optional) Select Translation Langauge and Translate",
|
35 |
+
value="english",
|
36 |
+
interactive=True
|
37 |
)
|
38 |
+
translate_btn = gr.Button("Translate")
|
39 |
with gr.Row():
|
40 |
+
translation_text = gr.Textbox(
|
41 |
+
label=" Translated Uyghur Text",
|
42 |
+
placeholder="Translated text will appear here...",
|
43 |
+
)
|
|
|
|
|
|
|
|
|
44 |
# TTS
|
45 |
with gr.Group():
|
46 |
with gr.Row():
|
47 |
+
example_audio = gr.Audio(label="(Optional) Generate AI Pronunciation")
|
48 |
with gr.Row():
|
49 |
tts_btn = gr.Button("Generate AI Pronunciation")
|
50 |
# ASR
|