mgbam commited on
Commit
01ecbcf
·
verified ·
1 Parent(s): ec074d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -216,17 +216,15 @@ DEMO_LIST = [
216
  ]
217
 
218
  # HF Inference Client
219
- HF_TOKEN = os.getenv('HF_TOKEN')
220
-
221
  HF_TOKEN = os.getenv('HF_TOKEN')
222
  GROQ_API_KEY = os.getenv('GROQ_API_KEY')
223
 
224
  def get_inference_client(model_id):
225
- """Return an InferenceClient configured correctly for Hugging Face or Groq."""
226
  if model_id == "moonshotai/Kimi-K2-Instruct":
227
  return InferenceClient(
228
  base_url="https://api.groq.com/openai/v1",
229
- api_key=GROQ_API_KEY,
230
  )
231
  else:
232
  return InferenceClient(
@@ -234,6 +232,7 @@ def get_inference_client(model_id):
234
  api_key=HF_TOKEN
235
  )
236
 
 
237
  # Type definitions
238
  History = List[Tuple[str, str]]
239
  Messages = List[Dict[str, str]]
 
216
  ]
217
 
218
  # HF Inference Client
 
 
219
  HF_TOKEN = os.getenv('HF_TOKEN')
220
  GROQ_API_KEY = os.getenv('GROQ_API_KEY')
221
 
222
  def get_inference_client(model_id):
223
+ """Return an InferenceClient configured for Hugging Face or Groq."""
224
  if model_id == "moonshotai/Kimi-K2-Instruct":
225
  return InferenceClient(
226
  base_url="https://api.groq.com/openai/v1",
227
+ api_key=GROQ_API_KEY
228
  )
229
  else:
230
  return InferenceClient(
 
232
  api_key=HF_TOKEN
233
  )
234
 
235
+
236
  # Type definitions
237
  History = List[Tuple[str, str]]
238
  Messages = List[Dict[str, str]]