hwberry2 commited on
Commit
bf9cc35
·
1 Parent(s): 5646c70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,7 +6,7 @@ from gtts import gTTS
6
 
7
  openai.api_key = os.environ["OPEN_AI_KEY"]
8
 
9
- messages = [{"role": "system", "content": "You are a therapist. Respond in less than 5 sentences."}]
10
 
11
 
12
 
@@ -18,7 +18,8 @@ def transcribe(audio):
18
  return transcript["text"]
19
 
20
  def botResponse(user_input):
21
- global messages
 
22
 
23
  messages.append({"role": "user", "content": user_input})
24
  response = openai.ChatCompletion.create(
 
6
 
7
  openai.api_key = os.environ["OPEN_AI_KEY"]
8
 
9
+ #messages = [{"role": "system", "content": "You are a therapist. Respond in less than 5 sentences."}]
10
 
11
 
12
 
 
18
  return transcript["text"]
19
 
20
  def botResponse(user_input):
21
+ #global messages
22
+ messages = [{"role": "system", "content": "You are a therapist. Respond in less than 5 sentences."}]
23
 
24
  messages.append({"role": "user", "content": user_input})
25
  response = openai.ChatCompletion.create(