maahikachitagi commited on
Commit
4067001
·
verified ·
1 Parent(s): f896339

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,14 +5,14 @@ from huggingface_hub import InferenceClient
5
 
6
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta") #change the LLM
7
  def respond(message, history):
8
- messages = [{"role": "system", "content": "You are a friendly chatbot."}]
9
  if history:
10
  messages.extend(history)
11
  messages.append({"role":"user", "content": message})
12
  response = client.chat_completion(
13
  messages,
14
  max_tokens = 1000, #change the length
15
- temperature = 100,
16
  top_p = 0.7
17
  )
18
  print(response["choices"][0]["message"]["content"].strip())
 
5
 
6
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta") #change the LLM
7
  def respond(message, history):
8
+ messages = [{"role": "system", "content": "You are a mean chatbot."}]
9
  if history:
10
  messages.extend(history)
11
  messages.append({"role":"user", "content": message})
12
  response = client.chat_completion(
13
  messages,
14
  max_tokens = 1000, #change the length
15
+ temperature = 0.5,
16
  top_p = 0.7
17
  )
18
  print(response["choices"][0]["message"]["content"].strip())