Zw07 commited on
Commit
4f7e4ab
·
verified ·
1 Parent(s): ffdec00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -214,6 +214,7 @@ def main():
214
 
215
  if file_extension in [".wav", ".flac"]:
216
  wav, sample_rate = torchaudio.load("test.wav")
 
217
 
218
  elif file_extension == ".mp3":
219
  # Load an MP3 file
@@ -221,7 +222,7 @@ def main():
221
  # Export it as a WAV file
222
  audio.export("test.wav", format="wav")
223
  wav, sample_rate = torchaudio.load("test.wav")
224
- #wav= wav.unsqueeze(0)
225
 
226
  result2, message2 = detector.detect_watermark(wav, sample_rate=default_sr, message_threshold=0.5)
227
  st.markdown("This is likely an unwatermarked audio:")
 
214
 
215
  if file_extension in [".wav", ".flac"]:
216
  wav, sample_rate = torchaudio.load("test.wav")
217
+ wav= wav.unsqueeze(0)
218
 
219
  elif file_extension == ".mp3":
220
  # Load an MP3 file
 
222
  # Export it as a WAV file
223
  audio.export("test.wav", format="wav")
224
  wav, sample_rate = torchaudio.load("test.wav")
225
+ wav= wav.unsqueeze(0)
226
 
227
  result2, message2 = detector.detect_watermark(wav, sample_rate=default_sr, message_threshold=0.5)
228
  st.markdown("This is likely an unwatermarked audio:")