Joshua Lochner commited on
Commit
1581175
1 Parent(s): dd33b0c

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -2
pipeline.py CHANGED
@@ -314,8 +314,8 @@ class SponsorBlockClassificationPipeline(TextClassificationPipeline):
314
  if isinstance(data, str): # If string, assume this is what user wants to classify
315
  text = data
316
  else: # Otherwise, get data from transcript
317
- words = get_words(video['video_id'])
318
- segment_words = extract_segment(words, video['start'], video['end'])
319
  text = ' '.join(x['text'] for x in segment_words)
320
 
321
  return self.tokenizer(
 
314
  if isinstance(data, str): # If string, assume this is what user wants to classify
315
  text = data
316
  else: # Otherwise, get data from transcript
317
+ words = get_words(data['video_id'])
318
+ segment_words = extract_segment(words, data['start'], data['end'])
319
  text = ' '.join(x['text'] for x in segment_words)
320
 
321
  return self.tokenizer(