Sadmo commited on
Commit
1357cff
·
verified ·
1 Parent(s): c9d0924

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -2,19 +2,19 @@ import gradio as gr
2
  import random
3
  from huggingface_hub import InferenceClient
4
 
5
- client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
6
-
7
 
8
 
9
  def respond(message, history):
10
- messages = [{"role": "system", "content":"You are a friendly chatbot."}]
11
  if history:
12
  messages.extend(history)
13
  messages.append({"role": "user", "content": message})
14
 
15
  response = client.chat_completion(
16
  messages,
17
- max_tokens=100
18
  )
19
 
20
  return response['choices'][0]['message']['content'].strip()
 
2
  import random
3
  from huggingface_hub import InferenceClient
4
 
5
+ client = InferenceClient("deepseek-ai/DeepSeek-R1-Distill-Qwen-32B")
6
+ # Change the model
7
 
8
 
9
  def respond(message, history):
10
+ messages = [{"role": "system", "content":"You are a friendly chatbot."}] # change the personality here
11
  if history:
12
  messages.extend(history)
13
  messages.append({"role": "user", "content": message})
14
 
15
  response = client.chat_completion(
16
  messages,
17
+ max_tokens=100 # change the length of message
18
  )
19
 
20
  return response['choices'][0]['message']['content'].strip()