ostarling commited on
Commit
30ed0b7
·
verified ·
1 Parent(s): 852c5e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -5,7 +5,10 @@ from huggingface_hub import InferenceClient
5
  MODEL_ID = "MiniMaxAI/MiniMax-M2.5"
6
  SYSTEM_PROMPT = "You are a helpful assistant. Your name is MiniMax-M2.5 and is built by MiniMax."
7
 
8
- client = InferenceClient(MODEL_ID, token=os.environ.get("HF_TOKEN"))
 
 
 
9
 
10
 
11
  def respond(message, history, system_message, max_tokens, temperature, top_p):
@@ -21,7 +24,8 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
21
 
22
  response = ""
23
  for chunk in client.chat_completion(
24
- messages,
 
25
  max_tokens=max_tokens,
26
  stream=True,
27
  temperature=temperature,
 
5
  MODEL_ID = "MiniMaxAI/MiniMax-M2.5"
6
  SYSTEM_PROMPT = "You are a helpful assistant. Your name is MiniMax-M2.5 and is built by MiniMax."
7
 
8
+ client = InferenceClient(
9
+ provider="novita",
10
+ api_key=os.environ.get("HF_TOKEN"),
11
+ )
12
 
13
 
14
  def respond(message, history, system_message, max_tokens, temperature, top_p):
 
24
 
25
  response = ""
26
  for chunk in client.chat_completion(
27
+ MODEL_ID,
28
+ messages=messages,
29
  max_tokens=max_tokens,
30
  stream=True,
31
  temperature=temperature,