TroglodyteDerivations
commited on
Commit
•
84bf52e
1
Parent(s):
a314d7a
Modified lines 6 & 109
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import os
|
|
3 |
|
4 |
#from getpass import getpass
|
5 |
#HUGGINGFACEHUB_API_TOKEN = getpass()
|
6 |
-
os.getenv["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
|
7 |
|
8 |
|
9 |
from langchain_community.document_loaders import PyPDFLoader
|
@@ -106,7 +106,7 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
|
|
106 |
"tiiuae/falcon-7b-instruct"]:
|
107 |
llm = HuggingFaceEndpoint(
|
108 |
repo_id=llm_model,
|
109 |
-
token=
|
110 |
# model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "load_in_8bit": True}
|
111 |
temperature = temperature,
|
112 |
max_new_tokens = max_tokens,
|
|
|
3 |
|
4 |
#from getpass import getpass
|
5 |
#HUGGINGFACEHUB_API_TOKEN = getpass()
|
6 |
+
api_token = os.environ.get('HUGGINGFACE_API_TOKEN') #os.getenv["HUGGINGFACEHUB_API_TOKEN"] = HUGGINGFACEHUB_API_TOKEN
|
7 |
|
8 |
|
9 |
from langchain_community.document_loaders import PyPDFLoader
|
|
|
106 |
"tiiuae/falcon-7b-instruct"]:
|
107 |
llm = HuggingFaceEndpoint(
|
108 |
repo_id=llm_model,
|
109 |
+
token=api_token,
|
110 |
# model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "load_in_8bit": True}
|
111 |
temperature = temperature,
|
112 |
max_new_tokens = max_tokens,
|