Spaces:
Running
on
Zero
Running
on
Zero
Update main.py
Browse files
main.py
CHANGED
@@ -9,8 +9,8 @@ model = sentence_transformers.SentenceTransformer('allenai-specter')
|
|
9 |
|
10 |
full_data = datasets.load_dataset("ccm/publications")['train'].to_pandas()
|
11 |
|
12 |
-
substring = "
|
13 |
-
filter = full_data['
|
14 |
data = full_data[~filter]
|
15 |
|
16 |
dimensionality = len(data['embedding'][0])
|
@@ -30,7 +30,7 @@ def search(query):
|
|
30 |
for i in range(k):
|
31 |
search_results += str(i+1) + ". "
|
32 |
search_results += '"' + top_five["bibtex"].values[i]["title"] + '" '
|
33 |
-
search_results += top_five["bibtex"].values[i]["citation"]
|
34 |
if top_five["pub_url"].values[i] is not None:
|
35 |
search_results += " [Full Paper](" + top_five["pub_url"].values[i] + ")"
|
36 |
search_results += "\n"
|
|
|
9 |
|
10 |
full_data = datasets.load_dataset("ccm/publications")['train'].to_pandas()
|
11 |
|
12 |
+
substring = "0P9w_S0AAAAJ:yB1At4FlUx8C"
|
13 |
+
filter = full_data['author_pub_id'].str.contains(substring)
|
14 |
data = full_data[~filter]
|
15 |
|
16 |
dimensionality = len(data['embedding'][0])
|
|
|
30 |
for i in range(k):
|
31 |
search_results += str(i+1) + ". "
|
32 |
search_results += '"' + top_five["bibtex"].values[i]["title"] + '" '
|
33 |
+
search_results += "_" + top_five["bibtex"].values[i]["citation"] + "_"
|
34 |
if top_five["pub_url"].values[i] is not None:
|
35 |
search_results += " [Full Paper](" + top_five["pub_url"].values[i] + ")"
|
36 |
search_results += "\n"
|