Spaces:
Runtime error
Runtime error
Commit
·
636fd12
1
Parent(s):
c59a6cf
fix nbdev export
Browse files
app.ipynb
CHANGED
@@ -800,6 +800,7 @@
|
|
800 |
"metadata": {},
|
801 |
"outputs": [],
|
802 |
"source": [
|
|
|
803 |
"def split_text_as_md(*args, **kwargs):\n",
|
804 |
" output = split_text(*args, **kwargs)\n",
|
805 |
" return '# Text Splits:\\n' + '<br>----------<br>'.join(output)"
|
@@ -978,7 +979,7 @@
|
|
978 |
},
|
979 |
{
|
980 |
"cell_type": "code",
|
981 |
-
"execution_count":
|
982 |
"id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
|
983 |
"metadata": {},
|
984 |
"outputs": [],
|
|
|
800 |
"metadata": {},
|
801 |
"outputs": [],
|
802 |
"source": [
|
803 |
+
"#| export\n",
|
804 |
"def split_text_as_md(*args, **kwargs):\n",
|
805 |
" output = split_text(*args, **kwargs)\n",
|
806 |
" return '# Text Splits:\\n' + '<br>----------<br>'.join(output)"
|
|
|
979 |
},
|
980 |
{
|
981 |
"cell_type": "code",
|
982 |
+
"execution_count": 34,
|
983 |
"id": "0420310d-930b-4904-8bd4-3458ad8bdbd3",
|
984 |
"metadata": {},
|
985 |
"outputs": [],
|
app.py
CHANGED
@@ -5,7 +5,7 @@ __all__ = ['secret_import_failed', 'TEMP', 'TEMP_DIR', 'OPENAI_CLIENT_TTS_THREAD
|
|
5 |
'DEFAULT_PROVIDER', 'DEFAULT_MODEL', 'DEFAULT_VOICE', 'providers', 'clean_text_prompt', 'launch_kwargs',
|
6 |
'queue_kwargs', 'verify_authorization', 'split_text', 'concatenate_audio', 'create_speech_openai',
|
7 |
'create_speech_cartesiaai', 'create_speech', 'get_input_text_len', 'get_generation_cost',
|
8 |
-
'get_model_choices', 'update_model_choices', 'get_voice_choices', 'update_voice_choices']
|
9 |
|
10 |
# %% app.ipynb 4
|
11 |
import os
|
@@ -324,6 +324,11 @@ def update_voice_choices(provider, model):
|
|
324 |
choices = get_voice_choices(provider, model)
|
325 |
return gr.update(choices=choices,value=choices[0][1])
|
326 |
|
|
|
|
|
|
|
|
|
|
|
327 |
# %% app.ipynb 38
|
328 |
with gr.Blocks(title='TTS', head='TTS', delete_cache=(3600,3600)) as app:
|
329 |
|
|
|
5 |
'DEFAULT_PROVIDER', 'DEFAULT_MODEL', 'DEFAULT_VOICE', 'providers', 'clean_text_prompt', 'launch_kwargs',
|
6 |
'queue_kwargs', 'verify_authorization', 'split_text', 'concatenate_audio', 'create_speech_openai',
|
7 |
'create_speech_cartesiaai', 'create_speech', 'get_input_text_len', 'get_generation_cost',
|
8 |
+
'get_model_choices', 'update_model_choices', 'get_voice_choices', 'update_voice_choices', 'split_text_as_md']
|
9 |
|
10 |
# %% app.ipynb 4
|
11 |
import os
|
|
|
324 |
choices = get_voice_choices(provider, model)
|
325 |
return gr.update(choices=choices,value=choices[0][1])
|
326 |
|
327 |
+
# %% app.ipynb 37
|
328 |
+
def split_text_as_md(*args, **kwargs):
|
329 |
+
output = split_text(*args, **kwargs)
|
330 |
+
return '# Text Splits:\n' + '<br>----------<br>'.join(output)
|
331 |
+
|
332 |
# %% app.ipynb 38
|
333 |
with gr.Blocks(title='TTS', head='TTS', delete_cache=(3600,3600)) as app:
|
334 |
|