Update model.py
Browse files
model.py
CHANGED
|
@@ -9,10 +9,11 @@ from langchain.prompts import PromptTemplate, ChatPromptTemplate
|
|
| 9 |
import streamlit as st
|
| 10 |
|
| 11 |
your_endpoint_url = "https://kp4xdy196cw81uf3.us-east-1.aws.endpoints.huggingface.cloud"
|
|
|
|
| 12 |
|
| 13 |
llm = HuggingFaceEndpoint(
|
| 14 |
endpoint_url=f"{your_endpoint_url}",
|
| 15 |
-
huggingfacehub_api_token =
|
| 16 |
task = "text-generation",
|
| 17 |
max_new_tokens=128,
|
| 18 |
top_k=10,
|
|
|
|
| 9 |
import streamlit as st
|
| 10 |
|
| 11 |
your_endpoint_url = "https://kp4xdy196cw81uf3.us-east-1.aws.endpoints.huggingface.cloud"
|
| 12 |
+
token = st.secrets["HUGGINGFACEHUB_API_TOKEN"]
|
| 13 |
|
| 14 |
llm = HuggingFaceEndpoint(
|
| 15 |
endpoint_url=f"{your_endpoint_url}",
|
| 16 |
+
huggingfacehub_api_token = f"{token}",
|
| 17 |
task = "text-generation",
|
| 18 |
max_new_tokens=128,
|
| 19 |
top_k=10,
|