Luigi commited on
Commit
0ea37a5
·
verified ·
1 Parent(s): 78a2b5a

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. 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
- with open("temp_audio.mp3", "wb") as f:
 
 
69
  f.write(uploaded_file.getbuffer())
70
- st.session_state.audio_path = "temp_audio.mp3"
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()