CatoG commited on
Commit
b9ae2b9
·
verified ·
1 Parent(s): 1fe3ffc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -57,8 +57,11 @@ def get_llm(model_id: str = MODEL_OPTIONS[0], max_tokens: int = 256, temperature
57
  Returns API URL, headers, and parameters for HuggingFace Inference API.
58
  """
59
  token = get_huggingface_token()
60
- api_url = f"https://router.huggingface.co/models/{model_id}"
61
- headers = {"Authorization": f"Bearer {token}"}
 
 
 
62
 
63
  return api_url, headers, max_tokens, temperature
64
 
 
57
  Returns API URL, headers, and parameters for HuggingFace Inference API.
58
  """
59
  token = get_huggingface_token()
60
+ api_url = f"https://api-inference.huggingface.co/models/{model_id}"
61
+ headers = {
62
+ "Authorization": f"Bearer {token}",
63
+ "Content-Type": "application/json"
64
+ }
65
 
66
  return api_url, headers, max_tokens, temperature
67