Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from elevenlabs import voices, generate, set_api_key, UnauthenticatedRateLimitEr
|
|
10 |
elevenlabs_api_key = os.environ.get("ELEVEN_KEY_TOKEN", None)
|
11 |
voice_id = os.environ.get("VOICE_ID", None)
|
12 |
ttsPassword = os.environ.get("TTS_PASSWORD", None)
|
13 |
-
password =
|
14 |
|
15 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
16 |
|
@@ -138,9 +138,9 @@ def generate(
|
|
138 |
output += response.token.text
|
139 |
yield output
|
140 |
|
141 |
-
if
|
142 |
print("Using TTS!")
|
143 |
-
generate_voice(output, voice_id,
|
144 |
else:
|
145 |
print("Not using TTS!")
|
146 |
|
|
|
10 |
elevenlabs_api_key = os.environ.get("ELEVEN_KEY_TOKEN", None)
|
11 |
voice_id = os.environ.get("VOICE_ID", None)
|
12 |
ttsPassword = os.environ.get("TTS_PASSWORD", None)
|
13 |
+
password = ''
|
14 |
|
15 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
16 |
|
|
|
138 |
output += response.token.text
|
139 |
yield output
|
140 |
|
141 |
+
if password != '':
|
142 |
print("Using TTS!")
|
143 |
+
generate_voice(output, voice_id, password)
|
144 |
else:
|
145 |
print("Not using TTS!")
|
146 |
|