forked from camenduru/ai-voice-cloning
oops
This commit is contained in:
parent
41fca1a101
commit
1cbcf14cff
|
@ -222,7 +222,7 @@ def generate(
|
||||||
|
|
||||||
for line, cut_text in enumerate(texts):
|
for line, cut_text in enumerate(texts):
|
||||||
if emotion == "Custom":
|
if emotion == "Custom":
|
||||||
if prompt.strip() != "":
|
if prompt and prompt.strip() != "":
|
||||||
cut_text = f"[{prompt},] {cut_text}"
|
cut_text = f"[{prompt},] {cut_text}"
|
||||||
else:
|
else:
|
||||||
cut_text = f"[I am really {emotion.lower()},] {cut_text}"
|
cut_text = f"[I am really {emotion.lower()},] {cut_text}"
|
||||||
|
|
|
@ -45,6 +45,11 @@ def run_generation(
|
||||||
experimental_checkboxes,
|
experimental_checkboxes,
|
||||||
progress=gr.Progress(track_tqdm=True)
|
progress=gr.Progress(track_tqdm=True)
|
||||||
):
|
):
|
||||||
|
if not text:
|
||||||
|
raise gr.Error("Please provide text.")
|
||||||
|
if not voice:
|
||||||
|
raise gr.Error("Please provide a voice.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sample, outputs, stats = generate(
|
sample, outputs, stats = generate(
|
||||||
text=text,
|
text=text,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user