Spaces:
Running
on
Zero
Running
on
Zero
Update main.py
Browse files
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])
|
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 += (
|