Kabatubare commited on
Commit
e4b1e14
1 Parent(s): de47a16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,10 +4,10 @@ import torch
4
  import torchaudio
5
  import traceback
6
 
7
- def detect_watermark(audio_file):
8
  try:
9
  # Load the audio file using torchaudio
10
- waveform, sample_rate = torchaudio.load(audio_file.name) # Use .name attribute for the file path
11
 
12
  # Ensure waveform is 2D (channels, samples). If it's mono, add an axis.
13
  if waveform.ndim == 2:
 
4
  import torchaudio
5
  import traceback
6
 
7
+ def detect_watermark(audio_file_path):
8
  try:
9
  # Load the audio file using torchaudio
10
+ waveform, sample_rate = torchaudio.load(audio_file_path)
11
 
12
  # Ensure waveform is 2D (channels, samples). If it's mono, add an axis.
13
  if waveform.ndim == 2: