commonlemon commited on
Commit
86c4fa1
·
verified ·
1 Parent(s): 8e89158

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -23,6 +23,10 @@ def respond(message, history): #function for Gradio to call
23
  # chat completion API call forwarding the messages & other params to model
24
  response = client.chat_completion(messages, max_tokens=100, temperature = 2, top_p=0.95) #deepseek R1 recomended temp range: 0.5-0.7
25
  return response.choices[0].message.content.strip()
 
 
 
 
26
 
27
  # defining chatbot
28
  chatbot = gr.ChatInterface(respond, title = "", description = "") #using gradio to quickly build a chatbot UI (w/ convo history & user input)
 
23
  # chat completion API call forwarding the messages & other params to model
24
  response = client.chat_completion(messages, max_tokens=100, temperature = 2, top_p=0.95) #deepseek R1 recomended temp range: 0.5-0.7
25
  return response.choices[0].message.content.strip()
26
+ # max_tokens, to limit the number of tokens that can be generated
27
+ # temperature, which controls randomness (higher = more random)
28
+ # top_p, an alternative to sampling with temperature
29
+
30
 
31
  # defining chatbot
32
  chatbot = gr.ChatInterface(respond, title = "", description = "") #using gradio to quickly build a chatbot UI (w/ convo history & user input)