Spaces:
Runtime error
Runtime error
Commit
·
596bc83
1
Parent(s):
6f6a5fe
update
Browse files
app.py
CHANGED
@@ -7,8 +7,6 @@ import tempfile
|
|
7 |
|
8 |
from openai import OpenAI
|
9 |
|
10 |
-
server_name = os.getenv("SERVER_NAME", "127.0.0.1")
|
11 |
-
|
12 |
def tts(
|
13 |
text: str,
|
14 |
model: Union[str, Literal["tts-1", "tts-1-hd"]],
|
@@ -63,7 +61,7 @@ with gr.Blocks() as demo:
|
|
63 |
text.submit(fn=tts, inputs=[text, model, voice, output_file_format, speed, openai_key], outputs=output_audio, api_name="tts")
|
64 |
btn.click(fn=tts, inputs=[text, model, voice, output_file_format, speed, openai_key], outputs=output_audio, api_name=False)
|
65 |
|
66 |
-
demo.launch(
|
67 |
|
68 |
# curl --location "http://127.0.0.1:7860/api/tts" \
|
69 |
# --header "Content-Type: application/json" \
|
|
|
7 |
|
8 |
from openai import OpenAI
|
9 |
|
|
|
|
|
10 |
def tts(
|
11 |
text: str,
|
12 |
model: Union[str, Literal["tts-1", "tts-1-hd"]],
|
|
|
61 |
text.submit(fn=tts, inputs=[text, model, voice, output_file_format, speed, openai_key], outputs=output_audio, api_name="tts")
|
62 |
btn.click(fn=tts, inputs=[text, model, voice, output_file_format, speed, openai_key], outputs=output_audio, api_name=False)
|
63 |
|
64 |
+
demo.launch()
|
65 |
|
66 |
# curl --location "http://127.0.0.1:7860/api/tts" \
|
67 |
# --header "Content-Type: application/json" \
|