ccm commited on
Commit
971d097
β€’
1 Parent(s): 2b62863

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -44,19 +44,19 @@ def search(query: str, k: int):
44
 
45
  for i in range(k):
46
  search_results += "### " + top_five["bib_dict"].values[i]["title"] + "\n\n"
47
- search_results += str(D[0][i]) + "\n\n"
48
  if top_five["pub_url"].values[i] is not None:
49
- search_results += "[Full Text](" + top_five["pub_url"].values[i] + ") "
50
  if top_five["citedby_url"].values[i] is not None:
51
  search_results += (
52
- "[Cited By](" + SCHOLAR_URL + top_five["citedby_url"].values[i] + ") "
53
  )
54
  if top_five["url_related_articles"].values[i] is not None:
55
  search_results += (
56
  "[Related Articles]("
57
  + SCHOLAR_URL
58
  + top_five["url_related_articles"].values[i]
59
- + ") "
60
  )
61
  search_results += "\n\n```bibtex\n"
62
  search_results += (
 
44
 
45
  for i in range(k):
46
  search_results += "### " + top_five["bib_dict"].values[i]["title"] + "\n\n"
47
+ search_results += str("{:d}% relevant ".format(100*D[0][i]))
48
  if top_five["pub_url"].values[i] is not None:
49
+ search_results += "[Full Text](" + top_five["pub_url"].values[i] + ") "
50
  if top_five["citedby_url"].values[i] is not None:
51
  search_results += (
52
+ "[Cited By](" + SCHOLAR_URL + top_five["citedby_url"].values[i] + ") "
53
  )
54
  if top_five["url_related_articles"].values[i] is not None:
55
  search_results += (
56
  "[Related Articles]("
57
  + SCHOLAR_URL
58
  + top_five["url_related_articles"].values[i]
59
+ + ") "
60
  )
61
  search_results += "\n\n```bibtex\n"
62
  search_results += (