audio_book
#3
by
dbeck22
- opened
app.py
CHANGED
@@ -106,8 +106,7 @@ def text_to_speech_app(prompt: str, voice: str, emotion: str, use_random_seed: b
|
|
106 |
# check NSFW
|
107 |
print("Checking prompt safety...")
|
108 |
try:
|
109 |
-
|
110 |
-
is_nsfw = False
|
111 |
except gr.Error as e:
|
112 |
return None, f"There was an error. Please wait for a second and try again."
|
113 |
|
@@ -152,8 +151,7 @@ with gr.Blocks() as app:
|
|
152 |
**Like & follow** for more AI projects:
|
153 |
|
154 |
|
155 |
-
• Instagram: [@nihal_gazi_io](https://www.instagram.com/nihal_gazi_io/)
|
156 |
-
• X.com: [@NihalGazi_](https://x.com/NihalGazi_?t=f9UtAv005GppiIIXFEWMSQ&s=09)
|
157 |
• Discord: nihal_gazi_io"""
|
158 |
)
|
159 |
|
@@ -188,8 +186,7 @@ with gr.Blocks() as app:
|
|
188 |
random_seed_checkbox,
|
189 |
seed_input
|
190 |
],
|
191 |
-
outputs=[audio_output, status_output]
|
192 |
-
concurrency_limit=30
|
193 |
)
|
194 |
|
195 |
|
@@ -197,7 +194,7 @@ with gr.Blocks() as app:
|
|
197 |
examples=[
|
198 |
["Hello there! This is a test of the text-to-speech system.", "alloy", "neutral", False, 12345],
|
199 |
["Surely *you* wouldn't want *that*. [laughs]", "shimmer", "sarcastic and mocking", True, 12345],
|
200 |
-
["[sobbing] I am feeling... [sighs] a bit down today [cry]", "
|
201 |
["This technology is absolutely amazing!", "nova", "excited and joyful", True, 12345],
|
202 |
],
|
203 |
inputs=[prompt_input, voice_dropdown, emotion_input, random_seed_checkbox, seed_input],
|
|
|
106 |
# check NSFW
|
107 |
print("Checking prompt safety...")
|
108 |
try:
|
109 |
+
is_nsfw = check_nsfw(prompt)
|
|
|
110 |
except gr.Error as e:
|
111 |
return None, f"There was an error. Please wait for a second and try again."
|
112 |
|
|
|
151 |
**Like & follow** for more AI projects:
|
152 |
|
153 |
|
154 |
+
• Instagram: [@nihal_gazi_io](https://www.instagram.com/nihal_gazi_io/)
|
|
|
155 |
• Discord: nihal_gazi_io"""
|
156 |
)
|
157 |
|
|
|
186 |
random_seed_checkbox,
|
187 |
seed_input
|
188 |
],
|
189 |
+
outputs=[audio_output, status_output]
|
|
|
190 |
)
|
191 |
|
192 |
|
|
|
194 |
examples=[
|
195 |
["Hello there! This is a test of the text-to-speech system.", "alloy", "neutral", False, 12345],
|
196 |
["Surely *you* wouldn't want *that*. [laughs]", "shimmer", "sarcastic and mocking", True, 12345],
|
197 |
+
["[sobbing] I am feeling... [sighs] a bit down today [cry]", "fable", "sad and depressed, with stammering", True, 662437],
|
198 |
["This technology is absolutely amazing!", "nova", "excited and joyful", True, 12345],
|
199 |
],
|
200 |
inputs=[prompt_input, voice_dropdown, emotion_input, random_seed_checkbox, seed_input],
|