rizam commited on
Commit
d2801b8
·
1 Parent(s): 59dac14

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 ="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"
8
  start_sequence = "\nAI:"
9
  restart_sequence = "\nHuman: "
10
 
11
- def predict(input,history=[]):
12
 
13
  s = list(sum(history, ()))
14
  s.append(input)
@@ -16,7 +16,7 @@ def predict(input,history=[]):
16
  # \n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: "
17
  response = openai.Completion.create(
18
  model="text-davinci-003",
19
- prompt= initial_prompt + "\n" + str(s),
20
  temperature=0.9,
21
  max_tokens=150,
22
  top_p=1,
 
8
  start_sequence = "\nAI:"
9
  restart_sequence = "\nHuman: "
10
 
11
+ def predict(input, history=[]):
12
 
13
  s = list(sum(history, ()))
14
  s.append(input)
 
16
  # \n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: "
17
  response = openai.Completion.create(
18
  model="text-davinci-003",
19
+ prompt= str(s),
20
  temperature=0.9,
21
  max_tokens=150,
22
  top_p=1,