tiennlu commited on
Commit
71485a1
·
verified ·
1 Parent(s): e3aef30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -229,7 +229,8 @@ def get_transcript(video_id):
229
  transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
230
  transcript = transcript_list.find_transcript(['en'])
231
  translated_transcript = transcript.translate('en')
232
- tran += [t['text'] for t in translated_transcript.fetch() if t['text'] != '[music]']
 
233
  return ' '.join(tran)
234
 
235
 
 
229
  transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
230
  transcript = transcript_list.find_transcript(['en'])
231
  translated_transcript = transcript.translate('en')
232
+ transcript_data = translated_transcript.fetch()
233
+ tran += [t['text'] for t in transcript_data if t['text'] != '[music]']
234
  return ' '.join(tran)
235
 
236