KalooAI commited on
Commit
7e6f791
·
verified ·
1 Parent(s): bc3a4fb

Update app.py

Browse files

add Env variable for the token

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,11 +45,11 @@ def get_llm():
45
  # This uses Hugging Face's free Inference API to run the model
46
  # You don't need Ollama for this!
47
  llm = HuggingFaceEndpoint(
48
- repo_id="ibm-granite/granite-3.1-8b-instruct", # Use the latest available on API
49
  task="text-generation",
50
  max_new_tokens=512,
51
  temperature=0.1,
52
- huggingfacehub_api_token="YOUR_HF_TOKEN_HERE" # Get this from settings
53
  )
54
  return llm
55
 
 
45
  # This uses Hugging Face's free Inference API to run the model
46
  # You don't need Ollama for this!
47
  llm = HuggingFaceEndpoint(
48
+ repo_id="ibm-granite/granite-3.1-8b-instruct",
49
  task="text-generation",
50
  max_new_tokens=512,
51
  temperature=0.1,
52
+ huggingfacehub_api_token=os.getenv("HF_TOKEN") #
53
  )
54
  return llm
55