Spaces:
Runtime error
Runtime error
Commit ·
148f2de
1
Parent(s): ca02c10
A little more toxic, a little more conversation!
Browse files84 unmodified lines8586878889909184 unmodified lines@spaces.GPUdef infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, progress = gr.Progress()):print(gen_text)if model.predict(gen_text)['toxicity'] > 0.8:print("Flagged for toxicity:", gen_text)raise gr.Error("Your text was flagged for toxicity, please try again with a different text.")gr.Info("Converting audio...")84 unmodified lines8586878889909184 unmodified lines@spaces.GPUdef infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, progress = gr.Progress()):print(gen_text)if model.predict(gen_text)['toxicity'] > 0.2:print("Flagged for toxicity:", gen_text)raise gr.Error("Your text was flagged for toxicity, please try again with a different text.")gr.Info("Converting audio...")
app.py+1-1