chrisjay commited on
Commit
50064ee
1 Parent(s): c320029

changed output type to html

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- print(output_string)
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
- output_res = gr.outputs.HTML()
37
 
38
 
39
  save = gr.Button("Save")
40
 
41
- save.click(get_record, inputs=[language,text,record],outputs=output_res)
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)