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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -82,8 +82,25 @@ retriever = PineconeHybridSearchRetriever(
82
  alpha=0.5,
83
  )
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  # Initialize LLM
86
- llm = ChatPerplexity(temperature=0, pplx_api_key=GROQ_API_KEY, model="llama-3.1-sonar-large-128k-chat", max_tokens=512, max_retries=2)
87
 
88
  # Initialize Reranker
89
  # model = HuggingFaceCrossEncoder(model_name="BAAI/bge-reranker-base")
 
82
  alpha=0.5,
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",
91
+ task="text-generation",
92
+ max_new_tokens=512,
93
+ do_sample=False,
94
+ repetition_penalty=1.03,
95
+ )
96
+
97
+ llm = ChatHuggingFace(llm=llm, verbose=True)
98
+
99
+
100
+
101
+
102
  # Initialize LLM
103
+ # llm = ChatPerplexity(temperature=0, pplx_api_key=GROQ_API_KEY, model="llama-3.1-sonar-large-128k-chat", max_tokens=512, max_retries=2)
104
 
105
  # Initialize Reranker
106
  # model = HuggingFaceCrossEncoder(model_name="BAAI/bge-reranker-base")