prsingh1982 commited on
Commit
32644f5
·
verified ·
1 Parent(s): fee2cfc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -5,11 +5,11 @@ from huggingface_hub import InferenceClient
5
  """
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
- token = os.environ.get("API_TOKEN")
9
  headers = {
10
- 'Authorization': f'Bearer {token}'
11
  }
12
- client = InferenceClient(model="meta-llama/Meta-Llama-3-8B-Instruct",headers=headers,token=token)
13
 
14
 
15
  def respond(
@@ -26,8 +26,8 @@ def respond(
26
  print(temperature)
27
  print(top_p)
28
  print(message)
29
- print(token)
30
- print(headers)
31
  for val in history:
32
  if val[0]:
33
  messages.append({"role": "user", "content": val[0]})
 
5
  """
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
+ api_token = os.environ.get("API_TOKEN")
9
  headers = {
10
+ 'Authorization': f'Bearer {api_token}'
11
  }
12
+ client = InferenceClient(model="meta-llama/Meta-Llama-3-8B-Instruct",headers=headers,token=api_token)
13
 
14
 
15
  def respond(
 
26
  print(temperature)
27
  print(top_p)
28
  print(message)
29
+ #print(token)
30
+ #print(headers)
31
  for val in history:
32
  if val[0]:
33
  messages.append({"role": "user", "content": val[0]})