Web3Daily commited on
Commit
966b72d
1 Parent(s): 0b6eb19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,8 +8,8 @@ messages = [{"role": "system", "content": "You are a Web3 and cryptocurrency exp
8
  def CustomChatGPT(user_input):
9
  messages.append({"role": "user", "content": user_input})
10
  response = openai.ChatCompletion.create(
11
- model = "gpt-3.5-turbo",
12
- messages = messages
13
  )
14
  ChatGPT_reply = response["choices"][0]["message"]["content"]
15
  messages.append({"role": "assistant", "content": ChatGPT_reply})
@@ -18,7 +18,7 @@ def CustomChatGPT(user_input):
18
  demo = gr.Interface(
19
  fn=CustomChatGPT,
20
  inputs=gr.inputs.Text(label="Ask a question"), # Add a label to the input component
21
- output=gr.output.Text(label="Get your answer"),
22
  title="Web(GPT)3 Daily"
23
  )
24
 
 
8
  def CustomChatGPT(user_input):
9
  messages.append({"role": "user", "content": user_input})
10
  response = openai.ChatCompletion.create(
11
+ model="gpt-3.5-turbo",
12
+ messages=messages
13
  )
14
  ChatGPT_reply = response["choices"][0]["message"]["content"]
15
  messages.append({"role": "assistant", "content": ChatGPT_reply})
 
18
  demo = gr.Interface(
19
  fn=CustomChatGPT,
20
  inputs=gr.inputs.Text(label="Ask a question"), # Add a label to the input component
21
+ outputs="text",
22
  title="Web(GPT)3 Daily"
23
  )
24