quoc-khanh commited on
Commit
333458b
·
verified ·
1 Parent(s): 32e14d1

Update helpers.py

Browse files
Files changed (1) hide show
  1. helpers.py +4 -0
helpers.py CHANGED
@@ -15,6 +15,8 @@ import shutil
15
  import requests
16
  from bs4 import BeautifulSoup
17
 
 
 
18
  async def get_urls_splits(url='https://nct.neu.edu.vn/', char='https://nct.neu.edu.vn/'):
19
  reqs = requests.get(url)
20
  soup = BeautifulSoup(reqs.text, 'html.parser')
@@ -195,6 +197,8 @@ def augment_prompt(query: str, k: int = 10):
195
  queries = []
196
  queries.append(query)
197
 
 
 
198
  retriever = vectorstore.as_retriever(search_kwargs={"k": k})
199
  results = retriever.invoke(query)
200
 
 
15
  import requests
16
  from bs4 import BeautifulSoup
17
 
18
+ from file_loader import get_vectorstore
19
+
20
  async def get_urls_splits(url='https://nct.neu.edu.vn/', char='https://nct.neu.edu.vn/'):
21
  reqs = requests.get(url)
22
  soup = BeautifulSoup(reqs.text, 'html.parser')
 
197
  queries = []
198
  queries.append(query)
199
 
200
+ vectorstore = get_vectorstore()
201
+
202
  retriever = vectorstore.as_retriever(search_kwargs={"k": k})
203
  results = retriever.invoke(query)
204