AjithKSenthil commited on
Commit
b7658ca
·
verified ·
1 Parent(s): 314a38e

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +10 -5
chatbot.py CHANGED
@@ -20,9 +20,10 @@ def chatbot(input):
20
  if input:
21
  chatbot.messages.append({"role": "user", "content": input})
22
  chat = openai.ChatCompletion.create(
23
- model="gpt-3.5-turbo-0125", messages=chatbot.messages
 
24
  )
25
- reply = chat.choices[0].message.content
26
  chatbot.messages.append({"role": "assistant", "content": reply})
27
 
28
  conversation = ""
@@ -35,6 +36,10 @@ def chatbot(input):
35
  inputs = gr.Textbox(lines=7, label="Chat with AttachmentBot")
36
  outputs = gr.Textbox(label="Conversation")
37
 
38
- gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="AttachmentBot",
39
- description="Let me survey you about your attachment with certain people in your life, to begin enter start",
40
- theme="compact").launch()
 
 
 
 
 
20
  if input:
21
  chatbot.messages.append({"role": "user", "content": input})
22
  chat = openai.ChatCompletion.create(
23
+ model="gpt-3.5-turbo",
24
+ messages=chatbot.messages
25
  )
26
+ reply = chat.choices[0].message["content"]
27
  chatbot.messages.append({"role": "assistant", "content": reply})
28
 
29
  conversation = ""
 
36
  inputs = gr.Textbox(lines=7, label="Chat with AttachmentBot")
37
  outputs = gr.Textbox(label="Conversation")
38
 
39
+ gr.Interface(
40
+ fn=chatbot,
41
+ inputs=inputs,
42
+ outputs=outputs,
43
+ title="AttachmentBot",
44
+ description="Let me survey you about your attachment with certain people in your life, to begin enter start"
45
+ ).launch()