rafaa commited on
Commit
5fdfb22
·
verified ·
1 Parent(s): 88639b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = None
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 passwordInput.value != '':
142
  print("Using TTS!")
143
- generate_voice(output, voice_id, passwordInput)
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