Chrunos commited on
Commit
fce0e64
·
verified ·
1 Parent(s): 4b467a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -174,7 +174,7 @@ async def get_transcript(youtube_url: str):
174
  if subtitle_file.endswith('.json3'):
175
  import json
176
  subs = json.loads(content)
177
- text = ' '.join([e['segs'][0]['utf8'] for e in subs['events'] if e.get('segs'))
178
  elif subtitle_file.endswith('.vtt'):
179
  text = ' '.join(line.strip() for line in content.split('\n')
180
  if not line.startswith('WEBVTT')
 
174
  if subtitle_file.endswith('.json3'):
175
  import json
176
  subs = json.loads(content)
177
+ text = ' '.join([e['segs'][0]['utf8'] for e in subs['events'] if e.get('segs')])
178
  elif subtitle_file.endswith('.vtt'):
179
  text = ' '.join(line.strip() for line in content.split('\n')
180
  if not line.startswith('WEBVTT')