Commit
•
c306eca
1
Parent(s):
50aa7b7
Update pipeline.py
Browse files- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -50,7 +50,7 @@ class PreTrainedPipeline():
|
|
50 |
# For instance your model, processors, tokenizer that might be needed.
|
51 |
# This function is only called once, so do all the heavy processing I/O here"""
|
52 |
self.sampling_rate = 16000
|
53 |
-
|
54 |
|
55 |
self.processor = Wav2Vec2Processor.from_pretrained(path)
|
56 |
self.model = Wav2Vec2ForCTC.from_pretrained(path)
|
@@ -69,7 +69,7 @@ class PreTrainedPipeline():
|
|
69 |
"""
|
70 |
# IMPLEMENT_THIS
|
71 |
input_values = self.processor(audio=inputs, sampling_rate=self.sampling_rate, return_tensors="pt").input_values
|
72 |
-
|
73 |
if torch.cuda.is_available():
|
74 |
self.model.to("cuda")
|
75 |
input_values = input_values.to("cuda")
|
|
|
50 |
# For instance your model, processors, tokenizer that might be needed.
|
51 |
# This function is only called once, so do all the heavy processing I/O here"""
|
52 |
self.sampling_rate = 16000
|
53 |
+
|
54 |
|
55 |
self.processor = Wav2Vec2Processor.from_pretrained(path)
|
56 |
self.model = Wav2Vec2ForCTC.from_pretrained(path)
|
|
|
69 |
"""
|
70 |
# IMPLEMENT_THIS
|
71 |
input_values = self.processor(audio=inputs, sampling_rate=self.sampling_rate, return_tensors="pt").input_values
|
72 |
+
assert 1==0, "Call"
|
73 |
if torch.cuda.is_available():
|
74 |
self.model.to("cuda")
|
75 |
input_values = input_values.to("cuda")
|