sailfish commited on
Commit
e3be437
1 Parent(s): e520569
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -6,8 +6,10 @@ from huggingface_hub import InferenceClient
6
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
7
  """
8
 
 
9
  huggingface_token = os.getenv("SECRET_ENV_VARIABLE")
10
- client = InferenceClient(api_key=huggingface_token)
 
11
 
12
  '''
13
  import requests
@@ -45,8 +47,7 @@ def respond(
45
  response = ""
46
 
47
  for message in client.chat_completion(
48
- model="meta-llama/Llama-3.2-1B",
49
- messages=messages,
50
  max_tokens=max_tokens,
51
  stream=True,
52
  temperature=temperature,
 
6
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
7
  """
8
 
9
+ model_name = "meta-llama/Llama-3.2-1B"
10
  huggingface_token = os.getenv("SECRET_ENV_VARIABLE")
11
+ #client = InferenceClient(api_key=huggingface_token)
12
+ client = InferenceClient(model=model_name, token=huggingface_token)
13
 
14
  '''
15
  import requests
 
47
  response = ""
48
 
49
  for message in client.chat_completion(
50
+ messages,
 
51
  max_tokens=max_tokens,
52
  stream=True,
53
  temperature=temperature,