Daniel Tse commited on
Commit
253b4e4
1 Parent(s): a88c32a

Move transcribe function

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -1,6 +1,19 @@
1
  import streamlit as st
2
  from transformers import pipeline
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  st.markdown("# Podcast Q&A")
5
 
6
  st.markdown(
 
1
  import streamlit as st
2
  from transformers import pipeline
3
 
4
+ def transcribe_audio(audiofile):
5
+
6
+ st.session_state['audio'] = audiofile
7
+
8
+ print(f"audio_file_session_state:{st.session_state['audio'] }")
9
+
10
+ #get size of audio file
11
+ audio_size = round(os.path.getsize(st.session_state['audio'])/(1024*1024),1)
12
+
13
+ print(f"audio file size:{audio_size}")
14
+
15
+ return audio_size
16
+
17
  st.markdown("# Podcast Q&A")
18
 
19
  st.markdown(