mgbam commited on
Commit
3d99097
·
verified ·
1 Parent(s): cbf9f33

Update hf_client.py

Browse files
Files changed (1) hide show
  1. hf_client.py +4 -7
hf_client.py CHANGED
@@ -1,8 +1,3 @@
1
-
2
-
3
-
4
- ### hf_client.py
5
-
6
  import os
7
 
8
  from huggingface_hub import InferenceClient, HfApi
@@ -17,10 +12,12 @@ def get_inference_client(model_id, provider="auto"):
17
  """Return an InferenceClient with provider based on model_id and user selection."""
18
  if model_id == "moonshotai/Kimi-K2-Instruct":
19
  provider = "groq"
 
 
20
  return InferenceClient(
21
  provider=provider,
22
  api_key=HF_TOKEN,
23
- bill_to="huggingface"
24
  )
25
 
26
  # Tavily Search Client
@@ -31,4 +28,4 @@ if TAVILY_API_KEY:
31
  tavily_client = TavilyClient(api_key=TAVILY_API_KEY)
32
  except Exception as e:
33
  print(f"Failed to initialize Tavily client: {e}")
34
- tavily_client = None
 
 
 
 
 
 
1
  import os
2
 
3
  from huggingface_hub import InferenceClient, HfApi
 
12
  """Return an InferenceClient with provider based on model_id and user selection."""
13
  if model_id == "moonshotai/Kimi-K2-Instruct":
14
  provider = "groq"
15
+
16
+ # Using your specific username for billing
17
  return InferenceClient(
18
  provider=provider,
19
  api_key=HF_TOKEN,
20
+ bill_to="mgbam" # <-- Corrected this line
21
  )
22
 
23
  # Tavily Search Client
 
28
  tavily_client = TavilyClient(api_key=TAVILY_API_KEY)
29
  except Exception as e:
30
  print(f"Failed to initialize Tavily client: {e}")
31
+ tavily_client = None