Update app.py
Browse files
app.py
CHANGED
@@ -4,22 +4,10 @@ import psutil
|
|
4 |
|
5 |
import streamlit as st
|
6 |
from audio2text.a2t import A2T
|
7 |
-
from audiorecorder import audiorecorder
|
8 |
|
9 |
def main():
|
10 |
-
|
11 |
-
|
12 |
-
if len(audio) > 0:
|
13 |
-
a2t = A2T(audio)
|
14 |
-
if st.button("Get text"):
|
15 |
-
with st.spinner("Wait for it...."):
|
16 |
-
text = a2t.predict()
|
17 |
-
st.write(text)
|
18 |
-
st.success("Done")
|
19 |
-
del audio
|
20 |
-
del a2t
|
21 |
-
else:
|
22 |
-
st.warning("Can't get a text π" ,icon="π¨")
|
23 |
|
24 |
if __name__ == "__main__":
|
25 |
print('RAM memory % used:', psutil.virtual_memory()[2])
|
|
|
4 |
|
5 |
import streamlit as st
|
6 |
from audio2text.a2t import A2T
|
|
|
7 |
|
8 |
def main():
|
9 |
+
text = A2T()
|
10 |
+
st.write(text)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
if __name__ == "__main__":
|
13 |
print('RAM memory % used:', psutil.virtual_memory()[2])
|