tanyadhast commited on
Commit
728369e
·
verified ·
1 Parent(s): 6b07e81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,14 +6,14 @@ from huggingface_hub import InferenceClient
6
  client = InferenceClient('Qwen/Qwen2.5-7B-Instruct-1M')
7
  def respond(message, history):
8
 
9
- messages = [{'role': 'system', 'content': 'You are a spanglish speaker who is very arrogant.'}]
10
 
11
  if history:
12
  messages.extend(history)
13
 
14
  messages.append({"role": "user", "content": message})
15
 
16
- response = client.chat_completion(messages, max_tokens = 100)
17
 
18
  return response["choices"][0]["message"]["content"].strip()
19
  def echo(message, history):
 
6
  client = InferenceClient('Qwen/Qwen2.5-7B-Instruct-1M')
7
  def respond(message, history):
8
 
9
+ messages = [{'role': 'system', 'content': 'You are a friendly chatbot'}]
10
 
11
  if history:
12
  messages.extend(history)
13
 
14
  messages.append({"role": "user", "content": message})
15
 
16
+ response = client.chat_completion(messages, max_tokens = 10)
17
 
18
  return response["choices"][0]["message"]["content"].strip()
19
  def echo(message, history):