Daniel Tse commited on
Commit
01bea1f
1 Parent(s): b0e0272

Add info and session_state for summarization.

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -31,9 +31,11 @@ def transcribe_audio(audiofile):
31
  return transcription
32
 
33
  def summarize_podcast(audiotranscription):
 
34
  summarizer = pipeline("summarization", model="philschmid/flan-t5-base-samsum", device=0)
35
 
36
  summarized_text = summarizer(audiotranscription)
 
37
  return summarized_text
38
 
39
 
 
31
  return transcription
32
 
33
  def summarize_podcast(audiotranscription):
34
+ st.info("Summarizing...")
35
  summarizer = pipeline("summarization", model="philschmid/flan-t5-base-samsum", device=0)
36
 
37
  summarized_text = summarizer(audiotranscription)
38
+ st.session_state['summary'] = summarized_text
39
  return summarized_text
40
 
41