Commit
•
ee62cf8
1
Parent(s):
a1f3008
Update app.py
Browse files
app.py
CHANGED
@@ -74,8 +74,7 @@ from langchain.chains import ConversationalRetrievalChain
|
|
74 |
# len(data)
|
75 |
|
76 |
import os
|
77 |
-
|
78 |
-
#huggingfacehub_api_token = os.getenv("HF_API_TOKEN")
|
79 |
|
80 |
def get_pdf_text(pdf_docs):
|
81 |
text=""
|
@@ -129,7 +128,7 @@ def get_vector_store(text_chunks):
|
|
129 |
|
130 |
from langchain import HuggingFaceHub
|
131 |
|
132 |
-
llm=HuggingFaceHub(repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1")
|
133 |
|
134 |
# from langchain.chains import RetrievalQA
|
135 |
# # retriever = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=docsearch.as_retriever())
|
|
|
74 |
# len(data)
|
75 |
|
76 |
import os
|
77 |
+
huggingfacehub_api_token = os.environ.getattribute("HF_API_TOKEN")
|
|
|
78 |
|
79 |
def get_pdf_text(pdf_docs):
|
80 |
text=""
|
|
|
128 |
|
129 |
from langchain import HuggingFaceHub
|
130 |
|
131 |
+
llm=HuggingFaceHub(huggingfacehub_api_token=huggingfacehub_api_token,repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1")
|
132 |
|
133 |
# from langchain.chains import RetrievalQA
|
134 |
# # retriever = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=docsearch.as_retriever())
|