rafaa commited on
Commit
f0385df
·
verified ·
1 Parent(s): 0a9219a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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: