Spaces:
Runtime error
Runtime error
if not yet uploaded...
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
|
|
2 |
|
3 |
if __name__ == "__main__":
|
4 |
uploaded_file = st.file_uploader("Choose a file")
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
2 |
|
3 |
if __name__ == "__main__":
|
4 |
uploaded_file = st.file_uploader("Choose a file")
|
5 |
+
if uploaded_file is not None:
|
6 |
+
with open(uploaded_file, 'rb') as audio_file:
|
7 |
+
audio_bytes = audio_file.read()
|
8 |
+
st.audio(audio_bytes, format='audio/wav')
|