ameliabb0913 commited on
Commit
bb12bfd
·
verified ·
1 Parent(s): d7b55bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py CHANGED
@@ -26,7 +26,6 @@ def classify_emotion(audio_file):
26
  # Load and process audio
27
  speech, sr = librosa.load(audio_file, sr=16000)
28
  inputs = processor(speech, sampling_rate=16000, return_tensors="pt", padding=True, truncation=True)
29
- inputs["input_values"] = inputs["input_values"].unsqueeze(0) # Add batch dimension
30
 
31
  # Get predictions
32
  with torch.no_grad():
 
26
  # Load and process audio
27
  speech, sr = librosa.load(audio_file, sr=16000)
28
  inputs = processor(speech, sampling_rate=16000, return_tensors="pt", padding=True, truncation=True)
 
29
 
30
  # Get predictions
31
  with torch.no_grad():