ppsingh commited on
Commit
c997543
1 Parent(s): 7916905

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -165,7 +165,7 @@ async def chat(query,history,sources,reports,subtype,year):
165
  question_lst= [query]
166
  for question in question_lst:
167
  retriever = vectorstore.as_retriever(
168
- search_type="similarity_score_threshold", search_kwargs={"score_threshold": 0.6, "k": int(config.get('retriever','TOP_K')), "filter":filter})
169
 
170
  context_retrieved = retriever.invoke(question)
171
  print(len(context_retrieved))
@@ -211,7 +211,7 @@ async def chat(query,history,sources,reports,subtype,year):
211
  # llama-3 endpoint = https://nhe9phsr2zhs0e36.eu-west-1.aws.endpoints.huggingface.cloud
212
  #callbacks = [StreamingStdOutCallbackHandler()]
213
  llm_qa = HuggingFaceEndpoint(
214
- endpoint_url="https://howaqfw0lpap12sg.us-east-1.aws.endpoints.huggingface.cloud",
215
  max_new_tokens=1024,
216
  huggingfacehub_api_token=HF_token,)
217
 
 
165
  question_lst= [query]
166
  for question in question_lst:
167
  retriever = vectorstore.as_retriever(
168
+ search_type="similarity_score_threshold", search_kwargs={"score_threshold": 0.6, "k": int(model_config.get('retriever','TOP_K')), "filter":filter})
169
 
170
  context_retrieved = retriever.invoke(question)
171
  print(len(context_retrieved))
 
211
  # llama-3 endpoint = https://nhe9phsr2zhs0e36.eu-west-1.aws.endpoints.huggingface.cloud
212
  #callbacks = [StreamingStdOutCallbackHandler()]
213
  llm_qa = HuggingFaceEndpoint(
214
+ endpoint_url= model_config.get('reader','ENDPOINT'),
215
  max_new_tokens=1024,
216
  huggingfacehub_api_token=HF_token,)
217