Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -99,8 +99,6 @@ async def greet(product,description):
|
|
99 |
if response.choices[0].message.content != "not moderated":
|
100 |
a_list = ["Sorry, I can't proceed for generating marketing email. Your content needs to be moderated first. Thank you!"]
|
101 |
with locker:
|
102 |
-
if tts is not None:
|
103 |
-
del tts
|
104 |
tts = TTS(os.path.join(os.getcwd(), tts_model_str))
|
105 |
speakers = tts.get_speakers()
|
106 |
model_to_speakers = dict()
|
@@ -125,8 +123,6 @@ async def greet(product,description):
|
|
125 |
delta = chunk['choices'][0]['delta']
|
126 |
if 'content' in delta:
|
127 |
with locker:
|
128 |
-
if tts is not None:
|
129 |
-
del tts
|
130 |
tts = TTS(os.path.join(os.getcwd(), tts_model_str))
|
131 |
speakers = tts.get_speakers()
|
132 |
model_to_speakers = dict()
|
|
|
99 |
if response.choices[0].message.content != "not moderated":
|
100 |
a_list = ["Sorry, I can't proceed for generating marketing email. Your content needs to be moderated first. Thank you!"]
|
101 |
with locker:
|
|
|
|
|
102 |
tts = TTS(os.path.join(os.getcwd(), tts_model_str))
|
103 |
speakers = tts.get_speakers()
|
104 |
model_to_speakers = dict()
|
|
|
123 |
delta = chunk['choices'][0]['delta']
|
124 |
if 'content' in delta:
|
125 |
with locker:
|
|
|
|
|
126 |
tts = TTS(os.path.join(os.getcwd(), tts_model_str))
|
127 |
speakers = tts.get_speakers()
|
128 |
model_to_speakers = dict()
|