Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -23,10 +23,6 @@ with col1:
|
|
23 |
#Record an Audio
|
24 |
wave_audio_data=st_audiorec()
|
25 |
|
26 |
-
#or upload an audio file
|
27 |
-
st.write('Or you can upload an audio file')
|
28 |
-
upload=st.file_uploader(label='Upload audio file')
|
29 |
-
|
30 |
#submit
|
31 |
button=st.form_submit_button(label='Convert to Text')
|
32 |
#if the submit button is pressed
|
@@ -38,9 +34,6 @@ with col1:
|
|
38 |
text=make_text(wave_audio_data)
|
39 |
|
40 |
st.write(text)
|
41 |
-
|
42 |
-
else:
|
43 |
-
st.error('Please record an audio', icon='π¨')
|
44 |
except:
|
45 |
st.write("we can't process your request at this time")
|
46 |
else:
|
@@ -50,23 +43,18 @@ with col2:
|
|
50 |
with st.form(key='file upload '):
|
51 |
#or upload an audio file
|
52 |
st.write('Or you can upload an audio file')
|
53 |
-
|
54 |
upload=st.file_uploader(label='Upload audio file')
|
55 |
|
56 |
#submit
|
57 |
button=st.form_submit_button(label='Convert to Text')
|
58 |
#if the submit button is pressed
|
59 |
if button:
|
60 |
-
|
61 |
-
|
62 |
-
text=make_text(upload)
|
63 |
-
|
64 |
-
st.write(text)
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
except:
|
69 |
-
st.write("we can't process your request at this time")
|
70 |
else:
|
71 |
st.success('No Audio data yet')
|
72 |
|
|
|
23 |
#Record an Audio
|
24 |
wave_audio_data=st_audiorec()
|
25 |
|
|
|
|
|
|
|
|
|
26 |
#submit
|
27 |
button=st.form_submit_button(label='Convert to Text')
|
28 |
#if the submit button is pressed
|
|
|
34 |
text=make_text(wave_audio_data)
|
35 |
|
36 |
st.write(text)
|
|
|
|
|
|
|
37 |
except:
|
38 |
st.write("we can't process your request at this time")
|
39 |
else:
|
|
|
43 |
with st.form(key='file upload '):
|
44 |
#or upload an audio file
|
45 |
st.write('Or you can upload an audio file')
|
46 |
+
|
47 |
upload=st.file_uploader(label='Upload audio file')
|
48 |
|
49 |
#submit
|
50 |
button=st.form_submit_button(label='Convert to Text')
|
51 |
#if the submit button is pressed
|
52 |
if button:
|
53 |
+
if upload is not None:
|
54 |
+
text=make_text(upload)
|
|
|
|
|
|
|
55 |
|
56 |
+
st.write(text)
|
57 |
+
|
|
|
|
|
58 |
else:
|
59 |
st.success('No Audio data yet')
|
60 |
|