Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,8 @@ from langchain.llms import HuggingFaceHub
|
|
8 |
|
9 |
from chain import get_new_chain1
|
10 |
|
|
|
|
|
11 |
def get_faiss_store():
|
12 |
with open("docs.pkl", 'rb') as f:
|
13 |
faiss_store = pickle.load(f)
|
@@ -22,7 +24,7 @@ def load_model():
|
|
22 |
|
23 |
flan_ul = HuggingFaceHub(repo_id="google/flan-ul2",
|
24 |
model_kwargs={"temperature":0.1, "max_new_tokens":200},
|
25 |
-
huggingfacehub_api_token=
|
26 |
|
27 |
qa_chain = get_new_chain1(vectorstore, flan_ul, flan_ul, isFlan=True)
|
28 |
return qa_chain
|
|
|
8 |
|
9 |
from chain import get_new_chain1
|
10 |
|
11 |
+
api_token = os.environ["HF_TOKEN"]
|
12 |
+
|
13 |
def get_faiss_store():
|
14 |
with open("docs.pkl", 'rb') as f:
|
15 |
faiss_store = pickle.load(f)
|
|
|
24 |
|
25 |
flan_ul = HuggingFaceHub(repo_id="google/flan-ul2",
|
26 |
model_kwargs={"temperature":0.1, "max_new_tokens":200},
|
27 |
+
huggingfacehub_api_token=api_token)
|
28 |
|
29 |
qa_chain = get_new_chain1(vectorstore, flan_ul, flan_ul, isFlan=True)
|
30 |
return qa_chain
|