Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadd Env variable for the token
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",
|
| 49 |
task="text-generation",
|
| 50 |
max_new_tokens=512,
|
| 51 |
temperature=0.1,
|
| 52 |
-
huggingfacehub_api_token="
|
| 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 |
|