prsingh1982 commited on
Commit
523f251
·
verified ·
1 Parent(s): 97f6f01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,13 +1,15 @@
1
  import gradio as gr
 
2
  from huggingface_hub import InferenceClient
3
 
4
  """
5
  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
6
  """
 
7
  headers = {
8
- 'Authorization': f'Bearer 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'
9
  }
10
- client = InferenceClient(model="meta-llama/Meta-Llama-3-8B-Instruct",headers=headers,token="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")
11
 
12
 
13
  def respond(
 
1
  import gradio as gr
2
+ import os
3
  from huggingface_hub import InferenceClient
4
 
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(