Spaces:
Build error
Build error
initial files
Browse files
app.py
CHANGED
@@ -9,7 +9,8 @@ def get_record(language,text,record):
|
|
9 |
# Save text and its corresponding record to flag
|
10 |
|
11 |
text =text.strip()
|
12 |
-
|
|
|
13 |
|
14 |
title = 'African Crowdsource Speech'
|
15 |
description = 'A platform to contribute to your African language by recording your voice'
|
@@ -28,12 +29,13 @@ with block:
|
|
28 |
|
29 |
#with gr.Tab('version1'):
|
30 |
#with gr.Row():
|
31 |
-
language = gr.inputs.Textbox(placeholder='Choose your language'
|
32 |
-
text = gr.inputs.Textbox(placeholder='Write your text'
|
33 |
record = gr.inputs.Audio(source="microphone",label='Record your voice')
|
34 |
-
|
35 |
|
36 |
save = gr.Button("Save")
|
|
|
37 |
save.click(get_record, inputs=[language,text,record],outputs=output)
|
38 |
|
39 |
block.launch(enable_queue=True,show_error = True)
|
|
|
9 |
# Save text and its corresponding record to flag
|
10 |
|
11 |
text =text.strip()
|
12 |
+
output_string = f'Record for text {text} successfully saved to dataset! Thank You.'
|
13 |
+
return output_string
|
14 |
|
15 |
title = 'African Crowdsource Speech'
|
16 |
description = 'A platform to contribute to your African language by recording your voice'
|
|
|
29 |
|
30 |
#with gr.Tab('version1'):
|
31 |
#with gr.Row():
|
32 |
+
language = gr.inputs.Textbox(placeholder='Choose your language')
|
33 |
+
text = gr.inputs.Textbox(placeholder='Write your text')
|
34 |
record = gr.inputs.Audio(source="microphone",label='Record your voice')
|
35 |
+
|
36 |
|
37 |
save = gr.Button("Save")
|
38 |
+
output = gr.outputs.Textbox(type="auto")
|
39 |
save.click(get_record, inputs=[language,text,record],outputs=output)
|
40 |
|
41 |
block.launch(enable_queue=True,show_error = True)
|