Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -141,6 +141,8 @@ def generate(
|
|
141 |
if password == ttsPassword:
|
142 |
print("Using TTS!")
|
143 |
generate_voice(output, voice_id, elevenlabs_api_key)
|
|
|
|
|
144 |
else:
|
145 |
print("Not using TTS!")
|
146 |
|
@@ -159,6 +161,7 @@ chat = gr.ChatInterface(
|
|
159 |
)
|
160 |
|
161 |
def ttsPasswordImport():
|
|
|
162 |
password = str(passwordInput.value)
|
163 |
|
164 |
with chat:
|
|
|
141 |
if password == ttsPassword:
|
142 |
print("Using TTS!")
|
143 |
generate_voice(output, voice_id, elevenlabs_api_key)
|
144 |
+
elif password != ttsPassword and password == '':
|
145 |
+
gr.Warning("Wrong password!")
|
146 |
else:
|
147 |
print("Not using TTS!")
|
148 |
|
|
|
161 |
)
|
162 |
|
163 |
def ttsPasswordImport():
|
164 |
+
global password
|
165 |
password = str(passwordInput.value)
|
166 |
|
167 |
with chat:
|