Spaces:
Sleeping
Sleeping
mj-new
commited on
Commit
•
81fdfb6
1
Parent(s):
426e2b3
Initial app with voice recording
Browse files- app.css +38 -0
- app.py +18 -7
- requirements.txt +2 -1
app.css
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
.infoPoint h1 {
|
3 |
+
font-size: 30px;
|
4 |
+
text-decoration: bold;
|
5 |
+
|
6 |
+
}
|
7 |
+
|
8 |
+
a {
|
9 |
+
text-decoration: underline;
|
10 |
+
color: #1f3b54 ;
|
11 |
+
}
|
12 |
+
|
13 |
+
.finished {
|
14 |
+
color:rgb(9, 102, 169);
|
15 |
+
font-size:13px
|
16 |
+
}
|
17 |
+
|
18 |
+
table {
|
19 |
+
|
20 |
+
margin: 25px 0;
|
21 |
+
font-size: 0.9em;
|
22 |
+
font-family: sans-serif;
|
23 |
+
min-width: 400px;
|
24 |
+
max-width: 400px;
|
25 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
|
26 |
+
}
|
27 |
+
|
28 |
+
table th,
|
29 |
+
table td {
|
30 |
+
padding: 12px 15px;
|
31 |
+
}
|
32 |
+
|
33 |
+
tr {
|
34 |
+
text-align: left;
|
35 |
+
}
|
36 |
+
thead tr {
|
37 |
+
text-align: left;
|
38 |
+
}
|
app.py
CHANGED
@@ -1,12 +1,23 @@
|
|
1 |
import gradio as gr
|
2 |
-
import whisper
|
|
|
3 |
|
4 |
def greet(name):
|
5 |
return "Hello " + name + "!!"
|
6 |
|
7 |
-
with
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
#import whisper
|
3 |
+
import numpy as np
|
4 |
|
5 |
def greet(name):
|
6 |
return "Hello " + name + "!!"
|
7 |
|
8 |
+
with open('app.css','r') as f:
|
9 |
+
css_file = f.read()
|
10 |
+
|
11 |
+
markdown="""
|
12 |
+
# Polish ASR BIGOS workspace
|
13 |
+
"""
|
14 |
+
|
15 |
+
block = gr.Blocks(css=css_file)
|
16 |
+
with block:
|
17 |
+
gr.Markdown(markdown)
|
18 |
+
with gr.Tabs():
|
19 |
+
with gr.TabItem('Voicebot playground'):
|
20 |
+
record = gr.Audio(source="microphone", label='Record your voice')
|
21 |
+
save = gr.Button("Submit")
|
22 |
+
|
23 |
+
block.launch()
|
requirements.txt
CHANGED
@@ -17,4 +17,5 @@ openai-whisper
|
|
17 |
configparser
|
18 |
jiwer
|
19 |
pytest
|
20 |
-
pandera
|
|
|
|
17 |
configparser
|
18 |
jiwer
|
19 |
pytest
|
20 |
+
pandera
|
21 |
+
gradio
|