Ritesh-hf commited on
Commit
5b33934
·
verified ·
1 Parent(s): 9b5871b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -31,6 +31,7 @@ USER_AGENT = os.getenv("USER_AGENT")
31
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
32
  SECRET_KEY = os.getenv("SECRET_KEY")
33
  PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
 
34
  SESSION_ID_DEFAULT = "abc123"
35
 
36
  # Set environment variables
@@ -83,8 +84,7 @@ retriever = PineconeHybridSearchRetriever(
83
  )
84
 
85
 
86
- from langchain_huggingface import HuggingFaceEndpoint,
87
- ChatHuggingFace
88
 
89
  llm = HuggingFaceEndpoint(
90
  repo_id="meta-llama/Llama-3.3-70B-Instruct",
@@ -92,6 +92,7 @@ llm = HuggingFaceEndpoint(
92
  max_new_tokens=512,
93
  do_sample=False,
94
  repetition_penalty=1.03,
 
95
  )
96
 
97
  llm = ChatHuggingFace(llm=llm, verbose=True)
 
31
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
32
  SECRET_KEY = os.getenv("SECRET_KEY")
33
  PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
34
+ HUGGINGFACE_TOKEN = os.getenv("huggingface_api_key")
35
  SESSION_ID_DEFAULT = "abc123"
36
 
37
  # Set environment variables
 
84
  )
85
 
86
 
87
+ from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
 
88
 
89
  llm = HuggingFaceEndpoint(
90
  repo_id="meta-llama/Llama-3.3-70B-Instruct",
 
92
  max_new_tokens=512,
93
  do_sample=False,
94
  repetition_penalty=1.03,
95
+ huggingfacehub_api_token=HUGGINGFACE_TOKEN
96
  )
97
 
98
  llm = ChatHuggingFace(llm=llm, verbose=True)