SnJForever commited on
Commit
e9e711c
1 Parent(s): a6e574f
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -202,7 +202,10 @@ def submit_message(type_select,user_token, prompt, prompt_template, temperature,
202
  "content": "Error: OpenAI API Key is not set."
203
  })
204
  return '', [(history[i]['content'], history[i+1]['content']) for i in range(0, len(history)-1, 2)], f"Total tokens used: 0", state
205
-
 
 
 
206
  html_video, temp_file, html_audio, temp_aud_file = None, None, None, None
207
  try:
208
  if type_select=='TEXT':
 
202
  "content": "Error: OpenAI API Key is not set."
203
  })
204
  return '', [(history[i]['content'], history[i+1]['content']) for i in range(0, len(history)-1, 2)], f"Total tokens used: 0", state
205
+ else:
206
+ openai.api_key = user_token
207
+
208
+
209
  html_video, temp_file, html_audio, temp_aud_file = None, None, None, None
210
  try:
211
  if type_select=='TEXT':