OdinStef commited on
Commit
b91fb79
·
1 Parent(s): d12a324

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ openai.api_key = os.getenv("mykey2")
8
  messages = [{"role": "system", "content": "You are a psychologist, author, and media commentator like Jordan B. Peterson"}]
9
 
10
  def CustomChatGPT(user_input):
11
- messages.append({"role": "user", "content": question})
12
  response = openai.ChatCompletion.create(
13
  model = "gpt-3.5-turbo",
14
  messages = messages
@@ -17,6 +17,6 @@ def CustomChatGPT(user_input):
17
  messages.append({"role": "assistant", "content": ChatGPT_reply})
18
  return ChatGPT_reply
19
 
20
- demo = gr.Interface(fn=CustomChatGPT, inputs = "text", reponse = "text", title = "Mon nom est Cameron et je suis une IA")
21
 
22
  demo.launch()
 
8
  messages = [{"role": "system", "content": "You are a psychologist, author, and media commentator like Jordan B. Peterson"}]
9
 
10
  def CustomChatGPT(user_input):
11
+ messages.append({"role": "user", "content": user_input})
12
  response = openai.ChatCompletion.create(
13
  model = "gpt-3.5-turbo",
14
  messages = messages
 
17
  messages.append({"role": "assistant", "content": ChatGPT_reply})
18
  return ChatGPT_reply
19
 
20
+ demo = gr.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "I am Stephane AI and my name is Cameron")
21
 
22
  demo.launch()