Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +5 -3
src/streamlit_app.py
CHANGED
|
@@ -65,10 +65,12 @@ with tab2:
|
|
| 65 |
|
| 66 |
uploaded_file = st.file_uploader("Upload Audio", type=["mp3", "wav"])
|
| 67 |
if uploaded_file:
|
| 68 |
-
|
|
|
|
|
|
|
| 69 |
f.write(uploaded_file.getbuffer())
|
| 70 |
-
st.session_state.audio_path =
|
| 71 |
-
|
| 72 |
with tab3:
|
| 73 |
st.subheader("Transcription & Summary")
|
| 74 |
status_placeholder = st.empty()
|
|
|
|
| 65 |
|
| 66 |
uploaded_file = st.file_uploader("Upload Audio", type=["mp3", "wav"])
|
| 67 |
if uploaded_file:
|
| 68 |
+
# FIX: Write to /tmp directory instead of current directory
|
| 69 |
+
temp_audio_path = "/tmp/temp_audio.mp3"
|
| 70 |
+
with open(temp_audio_path, "wb") as f:
|
| 71 |
f.write(uploaded_file.getbuffer())
|
| 72 |
+
st.session_state.audio_path = temp_audio_path
|
| 73 |
+
|
| 74 |
with tab3:
|
| 75 |
st.subheader("Transcription & Summary")
|
| 76 |
status_placeholder = st.empty()
|