yerang commited on
Commit
b55b510
·
verified ·
1 Parent(s): 80e5e95

Update stf/stf-api-alternative/src/stf_alternative/inference.py

Browse files
stf/stf-api-alternative/src/stf_alternative/inference.py CHANGED
@@ -141,7 +141,7 @@ def process_audio_chunk(audio_processor, audio_encoder, audio_chunk, device):
141
 
142
  input_values = audio_processor(
143
  audio_data, sampling_rate=16000, return_tensors="pt"
144
- ).cuda(0)["input_values"] #//.to(device)["input_values"]
145
 
146
  #with torch.no_grad():
147
  logits = audio_encoder(input_values=input_values)
 
141
 
142
  input_values = audio_processor(
143
  audio_data, sampling_rate=16000, return_tensors="pt"
144
+ ).to(device)["input_values"]
145
 
146
  #with torch.no_grad():
147
  logits = audio_encoder(input_values=input_values)