gautamtata commited on
Commit
f41ae34
·
1 Parent(s): 3fd5af3

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -121,7 +121,7 @@ class EndpointHandler():
121
  # Here we load the model and processor.
122
  self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
123
  self.config = AutoConfig.from_pretrained(f"{model_path}/config.json")
124
- self.processor = Wav2Vec2Processor.from_pretrained(model_path)
125
  self.model = Wav2Vec2ForSpeechClassification.from_pretrained(model_path).to(self.device)
126
 
127
  def speech_file_to_array_fn(self, path):
 
121
  # Here we load the model and processor.
122
  self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
123
  self.config = AutoConfig.from_pretrained(f"{model_path}/config.json")
124
+ self.processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-large-robust-ft-libri-960h")
125
  self.model = Wav2Vec2ForSpeechClassification.from_pretrained(model_path).to(self.device)
126
 
127
  def speech_file_to_array_fn(self, path):