Olivier-Truong
commited on
Commit
•
9ac81b3
1
Parent(s):
2154b14
Update app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
55 |
gr.Warning("Please record your voice with Microphone, or uncheck Use Microphone to use reference audios")
|
56 |
return (
|
57 |
None,
|
58 |
-
None,
|
59 |
)
|
60 |
|
61 |
else:
|
@@ -64,13 +64,13 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
64 |
if len(prompt)<2:
|
65 |
gr.Warning("Please give a longer prompt text")
|
66 |
return (
|
67 |
-
|
68 |
None,
|
69 |
)
|
70 |
if len(prompt)>10000:
|
71 |
gr.Warning("Text length limited to 10000 characters for this demo, please try shorter text")
|
72 |
return (
|
73 |
-
|
74 |
None,
|
75 |
)
|
76 |
try:
|
@@ -95,15 +95,15 @@ def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, req
|
|
95 |
raise e
|
96 |
|
97 |
return (
|
98 |
-
gr.make_waveform(
|
99 |
-
audio="output.wav",
|
100 |
-
),
|
101 |
"output.wav",
|
102 |
)
|
103 |
else:
|
104 |
gr.Warning("Please accept the Terms & Condition!")
|
105 |
return (
|
106 |
-
|
107 |
None,
|
108 |
)
|
109 |
|
|
|
55 |
gr.Warning("Please record your voice with Microphone, or uncheck Use Microphone to use reference audios")
|
56 |
return (
|
57 |
None,
|
58 |
+
#None,
|
59 |
)
|
60 |
|
61 |
else:
|
|
|
64 |
if len(prompt)<2:
|
65 |
gr.Warning("Please give a longer prompt text")
|
66 |
return (
|
67 |
+
# None,
|
68 |
None,
|
69 |
)
|
70 |
if len(prompt)>10000:
|
71 |
gr.Warning("Text length limited to 10000 characters for this demo, please try shorter text")
|
72 |
return (
|
73 |
+
# None,
|
74 |
None,
|
75 |
)
|
76 |
try:
|
|
|
95 |
raise e
|
96 |
|
97 |
return (
|
98 |
+
#gr.make_waveform(
|
99 |
+
#audio="output.wav",
|
100 |
+
#),
|
101 |
"output.wav",
|
102 |
)
|
103 |
else:
|
104 |
gr.Warning("Please accept the Terms & Condition!")
|
105 |
return (
|
106 |
+
# None,
|
107 |
None,
|
108 |
)
|
109 |
|