Daniel Tse
commited on
Commit
·
2ea7ea8
1
Parent(s):
3e7fc84
Store transcription as session state.
Browse files
app.py
CHANGED
|
@@ -35,9 +35,11 @@ def transcribe_audio(audiofile):
|
|
| 35 |
transcribe_pipe = pipeline(model="facebook/wav2vec2-base-960h")
|
| 36 |
transcription = transcribe_pipe(audiofile, chunk_length_s=10, stride_length_s=(4, 2))
|
| 37 |
|
|
|
|
| 38 |
print(f"transcription: {transcription}")
|
|
|
|
| 39 |
|
| 40 |
-
return
|
| 41 |
|
| 42 |
st.markdown("# Podcast Q&A")
|
| 43 |
|
|
|
|
| 35 |
transcribe_pipe = pipeline(model="facebook/wav2vec2-base-960h")
|
| 36 |
transcription = transcribe_pipe(audiofile, chunk_length_s=10, stride_length_s=(4, 2))
|
| 37 |
|
| 38 |
+
st.session_state['transcription'] = transcription
|
| 39 |
print(f"transcription: {transcription}")
|
| 40 |
+
st.info('Done Transcription')
|
| 41 |
|
| 42 |
+
return transcription
|
| 43 |
|
| 44 |
st.markdown("# Podcast Q&A")
|
| 45 |
|