Spaces:
Running
on
Zero
Running
on
Zero
ThreadAbort
commited on
Commit
•
51cdd78
1
Parent(s):
148f2de
toxic? Britt knows.
Browse files
app.py
CHANGED
@@ -85,9 +85,9 @@ E2TTS_ema_model, E2TTS_base_model = load_model("E2TTS_Base", UNetT, E2TTS_model_
|
|
85 |
@spaces.GPU
|
86 |
def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, progress = gr.Progress()):
|
87 |
print(gen_text)
|
88 |
-
if model.predict(gen_text)['toxicity'] > 0.2:
|
89 |
-
|
90 |
-
|
91 |
gr.Info("Converting audio...")
|
92 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
|
93 |
aseg = AudioSegment.from_file(ref_audio_orig)
|
|
|
85 |
@spaces.GPU
|
86 |
def infer(ref_audio_orig, ref_text, gen_text, exp_name, remove_silence, progress = gr.Progress()):
|
87 |
print(gen_text)
|
88 |
+
# if model.predict(gen_text)['toxicity'] > 0.2:
|
89 |
+
# print("Flagged for toxicity:", gen_text)
|
90 |
+
# raise gr.Error("Your text was flagged for toxicity, please try again with a different text.")
|
91 |
gr.Info("Converting audio...")
|
92 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
|
93 |
aseg = AudioSegment.from_file(ref_audio_orig)
|