Spaces:
Build error
Build error
gorkemgoknar
commited on
Commit
•
d6aee2b
1
Parent(s):
09a4f9c
Update app.py
Browse files
app.py
CHANGED
@@ -36,11 +36,14 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree):
|
|
36 |
speaker_wav=speaker_wav,
|
37 |
language=language,
|
38 |
)
|
39 |
-
except RuntimeError :
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
44 |
|
45 |
return (
|
46 |
gr.make_waveform(
|
@@ -186,7 +189,7 @@ gr.Interface(
|
|
186 |
gr.Textbox(
|
187 |
label="Text Prompt",
|
188 |
info="One or two sentences at a time is better",
|
189 |
-
value=
|
190 |
),
|
191 |
gr.Dropdown(
|
192 |
label="Language",
|
|
|
36 |
speaker_wav=speaker_wav,
|
37 |
language=language,
|
38 |
)
|
39 |
+
except RuntimeError as e :
|
40 |
+
if "device-assert" in str(e):
|
41 |
+
# cannot do anything on cuda device side error, need tor estart
|
42 |
+
gr.Warning("Unhandled Exception encounter, please retry in a minute")
|
43 |
+
print("Cuda device-assert Runtime encountered need restart")
|
44 |
+
sys.exit("Exit due to cuda device-assert")
|
45 |
+
else:
|
46 |
+
raise e
|
47 |
|
48 |
return (
|
49 |
gr.make_waveform(
|
|
|
189 |
gr.Textbox(
|
190 |
label="Text Prompt",
|
191 |
info="One or two sentences at a time is better",
|
192 |
+
value="""Hi there, I'm your new voice clone. Try your best to upload quality audio. Like my grandma used to say: "Garbage in, garbage out!"""",
|
193 |
),
|
194 |
gr.Dropdown(
|
195 |
label="Language",
|