Joshua Lochner
commited on
Commit
·
e513830
1
Parent(s):
d17215e
Update pipeline.py
Browse files- pipeline.py +1 -13
pipeline.py
CHANGED
@@ -297,19 +297,7 @@ class PreTrainedPipeline():
|
|
297 |
model=self.model2, tokenizer=self.tokenizer2)
|
298 |
|
299 |
def __call__(self, inputs: str)-> List[Dict[str, Any]]:
|
300 |
-
|
301 |
-
# TEMP testing
|
302 |
-
# data = [{"video_id": "pqh4LfPeCYs", "start": 835.933, "end": 927.581, "category": "sponsor"}]
|
303 |
-
# words = get_words("pqh4LfPeCYs")
|
304 |
-
# segment = extract_segment(words, 835.933, 927.581)
|
305 |
-
data = [{
|
306 |
-
'video_id': 'pqh4LfPeCYs',
|
307 |
-
'start': 835.933,
|
308 |
-
'end': 927.581,
|
309 |
-
'category': 'sponsor'
|
310 |
-
}]
|
311 |
-
# END TEMP
|
312 |
-
|
313 |
return self.pipeline2(data)
|
314 |
|
315 |
|
|
|
297 |
model=self.model2, tokenizer=self.tokenizer2)
|
298 |
|
299 |
def __call__(self, inputs: str)-> List[Dict[str, Any]]:
|
300 |
+
data = json.loads(inputs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
return self.pipeline2(data)
|
302 |
|
303 |
|