Spaces:
Running
on
Zero
Running
on
Zero
Update main.py
Browse files
main.py
CHANGED
@@ -31,15 +31,13 @@ def search(query, k):
|
|
31 |
|
32 |
for i in range(k):
|
33 |
search_results += '### ' + top_five["bib_dict"].values[i]["title"] + '\n\n'
|
34 |
-
# search_results += top_five["bib_dict"].values[i]["citation"] + "\n\n"
|
35 |
if top_five["pub_url"].values[i] is not None:
|
36 |
search_results += "[Full Text](" + top_five["pub_url"].values[i] + ") "
|
37 |
if top_five["citedby_url"].values[i] is not None:
|
38 |
search_results += "[Cited By](https://scholarl.google.com" + top_five["citedby_url"].values[i] + ") "
|
39 |
if top_five["url_related_articles"].values[i] is not None:
|
40 |
search_results += "[Related Articles](https://scholarl.google.com" + top_five["url_related_articles"].values[i] + ") "
|
41 |
-
search_results += "\n\n
|
42 |
-
search_results += "\n```bibtex\n"
|
43 |
search_results += json.dumps(top_five["bibtex"].values[i], indent=4).replace('\\n', '\n').replace('\\t', '\t').strip("\"")
|
44 |
search_results += "```\n"
|
45 |
return search_results
|
|
|
31 |
|
32 |
for i in range(k):
|
33 |
search_results += '### ' + top_five["bib_dict"].values[i]["title"] + '\n\n'
|
|
|
34 |
if top_five["pub_url"].values[i] is not None:
|
35 |
search_results += "[Full Text](" + top_five["pub_url"].values[i] + ") "
|
36 |
if top_five["citedby_url"].values[i] is not None:
|
37 |
search_results += "[Cited By](https://scholarl.google.com" + top_five["citedby_url"].values[i] + ") "
|
38 |
if top_five["url_related_articles"].values[i] is not None:
|
39 |
search_results += "[Related Articles](https://scholarl.google.com" + top_five["url_related_articles"].values[i] + ") "
|
40 |
+
search_results += "\n\n```bibtex\n"
|
|
|
41 |
search_results += json.dumps(top_five["bibtex"].values[i], indent=4).replace('\\n', '\n').replace('\\t', '\t').strip("\"")
|
42 |
search_results += "```\n"
|
43 |
return search_results
|