Spaces:
Running
on
T4
Running
on
T4
knowsuchagency
commited on
Commit
·
dec822e
1
Parent(s):
5e89640
chore: add comment
Browse files
main.py
CHANGED
@@ -131,6 +131,7 @@ def generate_audio(file: str, openai_api_key: str = None) -> bytes:
|
|
131 |
temporary_directory = "./gradio_cached_examples/tmp/"
|
132 |
os.makedirs(temporary_directory, exist_ok=True)
|
133 |
|
|
|
134 |
temporary_file = NamedTemporaryFile(
|
135 |
dir=temporary_directory,
|
136 |
delete=False,
|
|
|
131 |
temporary_directory = "./gradio_cached_examples/tmp/"
|
132 |
os.makedirs(temporary_directory, exist_ok=True)
|
133 |
|
134 |
+
# we use a temporary file because Gradio's audio component doesn't work with raw bytes in Safari
|
135 |
temporary_file = NamedTemporaryFile(
|
136 |
dir=temporary_directory,
|
137 |
delete=False,
|