Zw07 commited on
Commit
97af788
·
verified ·
1 Parent(s): 55aeba1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -159,6 +159,8 @@ def main():
159
 
160
  elif file_extension == ".mp3":
161
  wav, sample_rate = librosa.load("test.mp3")
 
 
162
  st.markdown("Before unsqueeze mp3")
163
  st.markdown(wav)
164
 
 
159
 
160
  elif file_extension == ".mp3":
161
  wav, sample_rate = librosa.load("test.mp3")
162
+ wav = torch.tensor(wav).float() / 32768.0
163
+ wav = audio.unsqueeze(0).unsqueeze(0)
164
  st.markdown("Before unsqueeze mp3")
165
  st.markdown(wav)
166