zcaspar commited on
Commit
8765691
·
1 Parent(s): 828446d

Bodybuilding runner

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -9,7 +9,8 @@ openai.api_key = "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"
9
  def chatbot(input):
10
  messages = []
11
  if input:
12
- context = "Summarise the following input in one paragrph and extract all named entities as a python list:"
 
13
  messages.append({"role": "user", "content": context + input})
14
  chat = openai.ChatCompletion.create(
15
  model="gpt-3.5-turbo", messages=messages
@@ -18,7 +19,7 @@ def chatbot(input):
18
  messages.append({"role": "assistant", "content": reply})
19
  return reply
20
 
21
- inputs = gr.inputs.Textbox(lines=7, label="Chat with AI")
22
  outputs = gr.outputs.Textbox(label="Reply")
23
 
24
  iface = gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="AI Chatbot", description="Ask anything you want", theme="compact").launch(share=False)
 
9
  def chatbot(input):
10
  messages = []
11
  if input:
12
+ context = "Act as a high-end personal trainer for bodybuilding runners. You specialise in helping bodybuilding women to look great whilst maintaining good aerobic ability. \
13
+ With 25 per cent frequency end what you say with a joke about how the user should quit their job in law and start a business in bodybuilding for runners:"
14
  messages.append({"role": "user", "content": context + input})
15
  chat = openai.ChatCompletion.create(
16
  model="gpt-3.5-turbo", messages=messages
 
19
  messages.append({"role": "assistant", "content": reply})
20
  return reply
21
 
22
+ inputs = gr.inputs.Textbox(lines=7, label="Your Bodybuilding Runner PT")
23
  outputs = gr.outputs.Textbox(label="Reply")
24
 
25
  iface = gr.Interface(fn=chatbot, inputs=inputs, outputs=outputs, title="AI Chatbot", description="Ask anything you want", theme="compact").launch(share=False)