chrisjay commited on
Commit
8f4b37f
1 Parent(s): e7002f9

moved info inside Record tab

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -248,6 +248,8 @@ markdown="""
248
  Existing speech recognition systems do not support ANY African languages, excluding African speakers from voice-enabled devices. Our voice is our identity!
249
  And so the goal of the project is to make a simple digits dataset for African languages through crowd-sourcing. You can easily teach a model to recognise numbers in your language using this dataset.
250
 
 
 
251
  > Record numbers 0-9 in your African language.
252
 
253
  1. Fill in your email. This is completely optional. We need this to track your progress for the prize.
@@ -265,7 +267,6 @@ __Note:__ You should record all numbers shown till the end. It does not count i
265
  """
266
 
267
 
268
-
269
  PLOTS_FOR_GRADIO = []
270
  FUNCTIONS_FOR_GRADIO = []
271
 
@@ -274,10 +275,12 @@ FUNCTIONS_FOR_GRADIO = []
274
  block = gr.Blocks(css=BLOCK_CSS)
275
  with block:
276
  gr.Markdown(markdown)
277
- email = gr.inputs.Textbox(placeholder='your email',label="Email (Your email is not made public. We need it to consider you for the prize.)",default='')
278
  with gr.Tabs():
279
 
280
  with gr.TabItem('Record'):
 
 
 
281
  with gr.Row():
282
 
283
  language = gr.inputs.Dropdown(choices = sorted([lang_.title() for lang_ in list(DEFAULT_LANGS.keys())]),label="Choose language",default="Choose language")
@@ -298,7 +301,7 @@ with block:
298
 
299
  save.click(save_record, inputs=[language,text,record,number,age,gender,accent,state,current_number,country,email,done_recording],outputs=[output_result,number,state,current_number,done_recording,record])
300
 
301
- with gr.TabItem('Dashboard') as listen_tab:
302
 
303
  gr.Markdown("Statistics on the recordings contributed. You can find the dataset <a href='https://huggingface.co/datasets/chrisjay/crowd-speech-africa' target='blank'>here</a>.")
304
  display_html = gr.HTML("""<div style="color: green">
@@ -364,7 +367,7 @@ with block:
364
  #listen = gr.Button("Listen")
365
  listen_tab.select(show_records,inputs=[],outputs=[display_html,plot]+PLOTS_FOR_GRADIO)
366
 
367
- with gr.TabItem('Test Model') as listen_tab:
368
  # Dropdown to choose a language from any of the 6
369
  # When you choose, it will load the correponding model
370
  # And then one can record a voice and get the model prediction
248
  Existing speech recognition systems do not support ANY African languages, excluding African speakers from voice-enabled devices. Our voice is our identity!
249
  And so the goal of the project is to make a simple digits dataset for African languages through crowd-sourcing. You can easily teach a model to recognise numbers in your language using this dataset.
250
 
251
+ """
252
+ record_markdown = """
253
  > Record numbers 0-9 in your African language.
254
 
255
  1. Fill in your email. This is completely optional. We need this to track your progress for the prize.
267
  """
268
 
269
 
 
270
  PLOTS_FOR_GRADIO = []
271
  FUNCTIONS_FOR_GRADIO = []
272
 
275
  block = gr.Blocks(css=BLOCK_CSS)
276
  with block:
277
  gr.Markdown(markdown)
 
278
  with gr.Tabs():
279
 
280
  with gr.TabItem('Record'):
281
+ gr.Markdown(record_markdown)
282
+ email = gr.inputs.Textbox(placeholder='your email',label="Email (Your email is not made public. We need it to consider you for the prize.)",default='')
283
+
284
  with gr.Row():
285
 
286
  language = gr.inputs.Dropdown(choices = sorted([lang_.title() for lang_ in list(DEFAULT_LANGS.keys())]),label="Choose language",default="Choose language")
301
 
302
  save.click(save_record, inputs=[language,text,record,number,age,gender,accent,state,current_number,country,email,done_recording],outputs=[output_result,number,state,current_number,done_recording,record])
303
 
304
+ with gr.TabItem('Dataset') as listen_tab:
305
 
306
  gr.Markdown("Statistics on the recordings contributed. You can find the dataset <a href='https://huggingface.co/datasets/chrisjay/crowd-speech-africa' target='blank'>here</a>.")
307
  display_html = gr.HTML("""<div style="color: green">
367
  #listen = gr.Button("Listen")
368
  listen_tab.select(show_records,inputs=[],outputs=[display_html,plot]+PLOTS_FOR_GRADIO)
369
 
370
+ with gr.TabItem('Hear') as listen_tab:
371
  # Dropdown to choose a language from any of the 6
372
  # When you choose, it will load the correponding model
373
  # And then one can record a voice and get the model prediction