chrisjay commited on
Commit
13fc77a
1 Parent(s): d4a1e88

work on app.py

Browse files
Files changed (2) hide show
  1. app.py +11 -30
  2. app2.py +0 -0
app.py CHANGED
@@ -24,34 +24,15 @@ A platform to contribute to your African language by recording your voice
24
  # Get a dropdown of all African languages
25
 
26
  # Interface design begins
27
- block = gr.Blocks()
28
- with block:
29
- gr.Markdown(markdown)
30
 
31
- with gr.Tab('version1'):
32
- #with gr.Row():
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
-
40
- save = gr.Button("Save")
41
-
42
- save.click(get_record, inputs=[language,text,record],outputs=output_result)
43
-
44
- with gr.Tab('version2'):
45
- gr.Interface(fn=get_record,
46
- inputs=[gr.inputs.Textbox(placeholder='Choose your language'),
47
- gr.inputs.Textbox(placeholder='Write your text'),
48
- gr.inputs.Audio(source="microphone",label='Record your voice')
49
- ],
50
- outputs = gr.outputs.HTML(),
51
- title=title,
52
- description=description,
53
- enable_queue=True,
54
- theme='huggingface'
55
- )
56
-
57
- block.launch(enable_queue=True)
 
24
  # Get a dropdown of all African languages
25
 
26
  # Interface design begins
 
 
 
27
 
28
+ gr.Interface(fn=get_record,
29
+ inputs=[gr.inputs.Textbox(placeholder='Choose your language'),
30
+ gr.inputs.Textbox(placeholder='Write your text'),
31
+ gr.inputs.Audio(source="microphone",label='Record your voice')
32
+ ],
33
+ outputs = gr.outputs.HTML(),
34
+ title=title,
35
+ description=description,
36
+ enable_queue=True,
37
+ theme='huggingface'
38
+ ).launch(enable_queue=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app2.py ADDED
File without changes