Spaces:
Build error
Build error
changed output type to html
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def get_record(language,text,record):
|
|
10 |
|
11 |
text =text.strip()
|
12 |
output_string = "<html> <body> <div class='output'>"+f'Record for text {text} successfully saved to dataset! Thank You.'+"</div> </body> </html>"
|
13 |
-
|
14 |
return output_string
|
15 |
|
16 |
title = 'African Crowdsource Speech'
|
@@ -33,11 +33,11 @@ with block:
|
|
33 |
language = gr.inputs.Textbox(placeholder='Choose your language')
|
34 |
text = gr.inputs.Textbox(placeholder='Write your text')
|
35 |
record = gr.inputs.Audio(source="microphone",label='Record your voice')
|
36 |
-
|
37 |
|
38 |
|
39 |
save = gr.Button("Save")
|
40 |
|
41 |
-
save.click(get_record, inputs=[language,text,record],outputs=
|
42 |
|
43 |
block.launch(enable_queue=True)
|
|
|
10 |
|
11 |
text =text.strip()
|
12 |
output_string = "<html> <body> <div class='output'>"+f'Record for text {text} successfully saved to dataset! Thank You.'+"</div> </body> </html>"
|
13 |
+
|
14 |
return output_string
|
15 |
|
16 |
title = 'African Crowdsource Speech'
|
|
|
33 |
language = gr.inputs.Textbox(placeholder='Choose your language')
|
34 |
text = gr.inputs.Textbox(placeholder='Write your text')
|
35 |
record = gr.inputs.Audio(source="microphone",label='Record your voice')
|
36 |
+
output_result = gr.outputs.HTML()
|
37 |
|
38 |
|
39 |
save = gr.Button("Save")
|
40 |
|
41 |
+
save.click(get_record, inputs=[language,text,record],outputs=output_result)
|
42 |
|
43 |
block.launch(enable_queue=True)
|