waxihiv547 commited on
Commit
bbbddfc
1 Parent(s): 5f72f6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,8 +34,8 @@ def run_inference():
34
  audio, sampling_rate = librosa.load(input_audio, sr=None)
35
  duration = audio.shape[0] / sampling_rate
36
 
37
- if duration > 20 and limitation:
38
- return "Please upload an audio file that is less than 20 seconds. If you need to generate a longer audio file, please use Colab.", 400
39
 
40
  if len(audio.shape) > 1:
41
  audio = librosa.to_mono(audio.transpose(1, 0))
 
34
  audio, sampling_rate = librosa.load(input_audio, sr=None)
35
  duration = audio.shape[0] / sampling_rate
36
 
37
+ if duration > 120 and limitation:
38
+ return "Please upload an audio file that is less than 120 seconds. If you need to generate a longer audio file, please use Colab.", 400
39
 
40
  if len(audio.shape) > 1:
41
  audio = librosa.to_mono(audio.transpose(1, 0))