Irpan commited on
Commit
0bb57fd
·
1 Parent(s): 466dd36
Files changed (1) hide show
  1. app.py +32 -25
app.py CHANGED
@@ -19,22 +19,21 @@ with gr.Blocks() as app:
19
  # Input Column
20
  with gr.Column(scale=1):
21
  with gr.Row():
22
- with gr.Column(scale=0.2): # Script choice takes 1/5th of the row
23
  script_choice = gr.Radio(
24
  choices=["Uyghur Arabic", "Uyghur Latin"],
25
  label="1. Select Input Script",
26
  value="Uyghur Arabic"
27
  )
28
- with gr.Column(scale=0.8): # Textbox takes the remaining 4/5th
29
  input_text = gr.Textbox(
30
  label="2. Input Uyghur Text to Pronounce",
31
  placeholder="Enter Uyghur text here...",
32
  )
33
  with gr.Row():
34
- with gr.Column(scale=0.2):
 
35
  generate_btn = gr.Button("Generate Example Pronunciation")
36
- with gr.Column(scale=0.8):
37
- example_audio = gr.Audio(label="3. Click Generate Example Pronunciation", interactive=False)
38
  with gr.Row():
39
  user_audio = gr.Audio(
40
  label="4. Record/Upload Your Pronunciation",
@@ -46,26 +45,34 @@ with gr.Blocks() as app:
46
 
47
  # Output Column
48
  with gr.Column(scale=1):
49
- transcript_box = gr.Textbox(
50
- label="Transcript",
51
- placeholder="Automatic transcription of your audio..."
52
- )
53
- correct_pronunciation_box = gr.Textbox(
54
- label="Correct Pronunciation",
55
- placeholder="IPA representation of the correct pronunciation..."
56
- )
57
- user_pronunciation_box = gr.Textbox(
58
- label="User Pronunciation",
59
- placeholder="IPA representation of your pronunciation..."
60
- )
61
- match_box = gr.Textbox(
62
- label="Pronunciation Match",
63
- placeholder="Matching and mismatched characters visualized here..."
64
- )
65
- score_box = gr.Textbox(
66
- label="Pronunciation Score",
67
- placeholder="Your pronunciation score as a percentage..."
68
- )
 
 
 
 
 
 
 
 
69
 
70
  # Bind functions to buttons
71
  generate_btn.click(
 
19
  # Input Column
20
  with gr.Column(scale=1):
21
  with gr.Row():
22
+ with gr.Column(scale=1): # Script choice takes 1/5th of the row
23
  script_choice = gr.Radio(
24
  choices=["Uyghur Arabic", "Uyghur Latin"],
25
  label="1. Select Input Script",
26
  value="Uyghur Arabic"
27
  )
28
+ with gr.Column(scale=4): # Textbox takes the remaining 4/5th
29
  input_text = gr.Textbox(
30
  label="2. Input Uyghur Text to Pronounce",
31
  placeholder="Enter Uyghur text here...",
32
  )
33
  with gr.Row():
34
+ example_audio = gr.Audio(label="3. Click Generate Example Pronunciation")
35
+ with gr.Row():
36
  generate_btn = gr.Button("Generate Example Pronunciation")
 
 
37
  with gr.Row():
38
  user_audio = gr.Audio(
39
  label="4. Record/Upload Your Pronunciation",
 
45
 
46
  # Output Column
47
  with gr.Column(scale=1):
48
+ with gr.Row():
49
+ transcript_ugArab_box = gr.Textbox(
50
+ label="ASR Transcript (Uyghur Arabic)",
51
+ placeholder="Automatic transcription of your audio..."
52
+ )
53
+ transcript_ugLatn_box = gr.Textbox(
54
+ label="ASR Transcript (Uyghur Latin)",
55
+ placeholder="Automatic transcription of your audio..."
56
+ )
57
+ with gr.Row():
58
+ correct_pronunciation_box = gr.Textbox(
59
+ label="Correct Pronunciation",
60
+ placeholder="IPA representation of the correct pronunciation..."
61
+ )
62
+ user_pronunciation_box = gr.Textbox(
63
+ label="User Pronunciation",
64
+ placeholder="IPA representation of your pronunciation..."
65
+ )
66
+ with gr.Row():
67
+ match_box = gr.Textbox(
68
+ label="Pronunciation Match",
69
+ placeholder="Matching and mismatched characters visualized here..."
70
+ )
71
+ with gr.Row():
72
+ score_box = gr.Textbox(
73
+ label="Pronunciation Score",
74
+ placeholder="Your pronunciation score as a percentage..."
75
+ )
76
 
77
  # Bind functions to buttons
78
  generate_btn.click(