d22cs051 commited on
Commit
ad7a5df
·
1 Parent(s): 373e0ef

using first 4 sec of audio to predict

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ class DFSeparationApp:
34
  def predict(self, audio_file):
35
  # Load the audio file
36
  print(f"[LOG] Audio file: {audio_file}")
37
- audio_tensor = torch.tensor(audio_file[1],dtype=torch.float).unsqueeze(0)
38
  print(f"[LOG] Audio tensor shape: {audio_tensor.shape}")
39
  with torch.no_grad():
40
  # Make prediction
 
34
  def predict(self, audio_file):
35
  # Load the audio file
36
  print(f"[LOG] Audio file: {audio_file}")
37
+ audio_tensor = torch.tensor(audio_file[1][:64600],dtype=torch.float).unsqueeze(0)
38
  print(f"[LOG] Audio tensor shape: {audio_tensor.shape}")
39
  with torch.no_grad():
40
  # Make prediction