Spaces:
Build error
Build error
work on app.py
Browse files
app.py
CHANGED
|
@@ -28,16 +28,30 @@ block = gr.Blocks()
|
|
| 28 |
with block:
|
| 29 |
gr.Markdown(markdown)
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
| 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)
|
|
|
|
| 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 |
+
).launch()
|
| 56 |
+
|
| 57 |
block.launch(enable_queue=True)
|