Blane187 commited on
Commit
b7a69dc
1 Parent(s): d6ab360

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ def get_audio_duration(audio_file):
11
 
12
  def get_training_info(audio_file):
13
  if audio_file is None:
14
- return 'the audio file pls'
15
 
16
  duration = get_audio_duration(audio_file)
17
  sample_rate = wave.open(audio_file, 'rb').getframerate()
@@ -30,7 +30,7 @@ def get_training_info(audio_file):
30
  if min_duration <= duration < max_duration:
31
  break
32
  else:
33
- return 'Duration is not within the specified range.'
34
 
35
  return f'You should use the **{pretrain}** pretrain with **{epochs}** epochs at **{sample_rate/1000}kHz** sample rate. Good luck with your training!'
36
 
 
11
 
12
  def get_training_info(audio_file):
13
  if audio_file is None:
14
+ gr.Error('the audio file pls')
15
 
16
  duration = get_audio_duration(audio_file)
17
  sample_rate = wave.open(audio_file, 'rb').getframerate()
 
30
  if min_duration <= duration < max_duration:
31
  break
32
  else:
33
+ gr.Info('Duration is not within the specified range.'
34
 
35
  return f'You should use the **{pretrain}** pretrain with **{epochs}** epochs at **{sample_rate/1000}kHz** sample rate. Good luck with your training!'
36