Daniel Tse
commited on
Commit
·
c274bf0
1
Parent(s):
97c3b7e
Use whisper-medium model
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def transcribe_audio(audiofile):
|
|
| 25 |
|
| 26 |
pipe = pipeline(
|
| 27 |
"automatic-speech-recognition",
|
| 28 |
-
model="openai/whisper-
|
| 29 |
chunk_length_s=30,
|
| 30 |
device=device,
|
| 31 |
)
|
|
@@ -38,6 +38,13 @@ def transcribe_audio(audiofile):
|
|
| 38 |
|
| 39 |
return transcription
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
st.markdown("# Podcast Q&A")
|
| 42 |
|
| 43 |
st.markdown(
|
|
|
|
| 25 |
|
| 26 |
pipe = pipeline(
|
| 27 |
"automatic-speech-recognition",
|
| 28 |
+
model="openai/whisper-medium",
|
| 29 |
chunk_length_s=30,
|
| 30 |
device=device,
|
| 31 |
)
|
|
|
|
| 38 |
|
| 39 |
return transcription
|
| 40 |
|
| 41 |
+
def summarize_podcast(audiotranscription):
|
| 42 |
+
sum_pipe = pipeline("summarization",model="philschmid/flan-t5-base-samsum",clean_up_tokenization_spaces=True)
|
| 43 |
+
summary = ""
|
| 44 |
+
|
| 45 |
+
return summary
|
| 46 |
+
|
| 47 |
+
|
| 48 |
st.markdown("# Podcast Q&A")
|
| 49 |
|
| 50 |
st.markdown(
|