Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -138,6 +138,11 @@ def generate(
|
|
138 |
output += response.token.text
|
139 |
yield output
|
140 |
|
|
|
|
|
|
|
|
|
|
|
141 |
if password == ttsPassword:
|
142 |
print("Using TTS!")
|
143 |
generate_voice(output, voice_id, elevenlabs_api_key)
|
@@ -160,14 +165,4 @@ chat = gr.ChatInterface(
|
|
160 |
additional_inputs=[passwordInput],
|
161 |
)
|
162 |
|
163 |
-
def ttsPasswordImport():
|
164 |
-
global password
|
165 |
-
password = str(passwordInput.value)
|
166 |
-
print("password = " + str(password))
|
167 |
-
print("passwordInput.value = " + str(passwordInput.value))
|
168 |
-
print("passwordInput = " + str(passwordInput))
|
169 |
-
|
170 |
-
with chat:
|
171 |
-
passwordInput.input(fn=ttsPasswordImport())
|
172 |
-
|
173 |
chat.launch(show_api=False)
|
|
|
138 |
output += response.token.text
|
139 |
yield output
|
140 |
|
141 |
+
password = str(passwordInput.value)
|
142 |
+
print("password = " + str(password))
|
143 |
+
print("passwordInput.value = " + str(passwordInput.value))
|
144 |
+
print("passwordInput = " + str(passwordInput))
|
145 |
+
|
146 |
if password == ttsPassword:
|
147 |
print("Using TTS!")
|
148 |
generate_voice(output, voice_id, elevenlabs_api_key)
|
|
|
165 |
additional_inputs=[passwordInput],
|
166 |
)
|
167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
168 |
chat.launch(show_api=False)
|