NinjaTribe commited on
Commit
0fc4309
·
verified ·
1 Parent(s): 04577f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,8 +9,8 @@ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
9
 
10
  PERSONALITY = os.environ.get("CHATBOT_PERSONALITY")
11
 
12
- def chatbot(message, history):
13
- custom_prompt = PERSONALITY + "\n\nUser: " + message + "\nChatbot:"
14
  history.append((message))
15
  return history
16
 
@@ -19,7 +19,7 @@ def chatbot(message, history):
19
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
20
  """
21
  demo = gr.ChatInterface(
22
- chatbot,
23
  title="Shinobi - Japanese Culture Specialist",
24
  description="A chatbot specializing in Japanese culture.",
25
  type="messages"
 
9
 
10
  PERSONALITY = os.environ.get("CHATBOT_PERSONALITY")
11
 
12
+ def role(message, history):
13
+ custom_prompt = PERSONALITY + "\n\nUser: " + message + "\nrole:"
14
  history.append((message))
15
  return history
16
 
 
19
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
20
  """
21
  demo = gr.ChatInterface(
22
+ role,
23
  title="Shinobi - Japanese Culture Specialist",
24
  description="A chatbot specializing in Japanese culture.",
25
  type="messages"