pandora-s commited on
Commit
b1b1e13
·
verified ·
1 Parent(s): 378b82f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -16,6 +16,9 @@ def generate_tts(input_text, reference_audio_path, output_path="cloned.wav"):
16
  if result == 3:
17
  raise gr.Error("Input text blocked by moderation layer. Please ensure your text complies with our content guidelines by avoiding Sexual, Hate, Violence, Self-Harm content or Prompt Injection attempts.")
18
  return output_path if result == 0 else None
 
 
 
19
  except Exception as e:
20
  time.sleep(1*(i+1))
21
  print(e)
 
16
  if result == 3:
17
  raise gr.Error("Input text blocked by moderation layer. Please ensure your text complies with our content guidelines by avoiding Sexual, Hate, Violence, Self-Harm content or Prompt Injection attempts.")
18
  return output_path if result == 0 else None
19
+ except gr.Error as e:
20
+ print(f"Gradio Error: {e}")
21
+ raise e
22
  except Exception as e:
23
  time.sleep(1*(i+1))
24
  print(e)