Zw07 commited on
Commit
9f50e7b
1 Parent(s): b111dcd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -161,8 +161,10 @@ def main():
161
  elif file_extension == ".mp3":
162
  wav3, sample_rate = librosa.load("test.mp3")
163
  st.markdown(wav3)
164
- wav = torch.tensor(wav3).float() / 32768.0
165
- #wav = torch.from_numpy(wav) #/32768.0
 
 
166
  wav = audio.unsqueeze(0).unsqueeze(0)
167
  st.markdown("Before unsqueeze mp3")
168
  st.markdown(wav)
 
161
  elif file_extension == ".mp3":
162
  wav3, sample_rate = librosa.load("test.mp3")
163
  st.markdown(wav3)
164
+ #RuntimeError: Could not infer dtype of numpy.float32
165
+ #wav = torch.tensor(wav3).float() / 32768.0
166
+ #
167
+ wav = torch.from_numpy(wav3) #/32768.0
168
  wav = audio.unsqueeze(0).unsqueeze(0)
169
  st.markdown("Before unsqueeze mp3")
170
  st.markdown(wav)