Spaces:
Runtime error
Runtime error
jonathanagustin
commited on
Commit
•
6edfac9
1
Parent(s):
cc4f7fd
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def tts(
|
|
61 |
for chunk in response:
|
62 |
temp_file.write(chunk)
|
63 |
|
64 |
-
except openai.
|
65 |
# Catch OpenAI exceptions
|
66 |
raise gr.Error(f"An OpenAI error occurred: {e}")
|
67 |
except Exception as e:
|
|
|
61 |
for chunk in response:
|
62 |
temp_file.write(chunk)
|
63 |
|
64 |
+
except openai.OpenAIError as e:
|
65 |
# Catch OpenAI exceptions
|
66 |
raise gr.Error(f"An OpenAI error occurred: {e}")
|
67 |
except Exception as e:
|