PinoCorgi commited on
Commit
9e0afef
1 Parent(s): 64071f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -35,7 +35,11 @@ def get_similar_links(query, db, embeddings):
35
  soup = BeautifulSoup(html_doc, 'html.parser')
36
  href = [a['href'] for a in soup.find_all('a', href=True)]
37
  hrefs.append(href)
38
- return hrefs
 
 
 
 
39
 
40
 
41
  embedding_vector = get_hugging_face_model()
@@ -47,7 +51,7 @@ if text_input:
47
  query = text_input
48
  answer = get_similar_links(query, db, embedding_vector)
49
  for link in answer:
50
- st.write(link[0])
51
 
52
  else:
53
  st.info("Please Input Valid Text")
 
35
  soup = BeautifulSoup(html_doc, 'html.parser')
36
  href = [a['href'] for a in soup.find_all('a', href=True)]
37
  hrefs.append(href)
38
+ links = []
39
+ for href_list in hrefs:
40
+ for link in href_list:
41
+ links.append(link)
42
+ return links
43
 
44
 
45
  embedding_vector = get_hugging_face_model()
 
51
  query = text_input
52
  answer = get_similar_links(query, db, embedding_vector)
53
  for link in answer:
54
+ st.write(link)
55
 
56
  else:
57
  st.info("Please Input Valid Text")