Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -25,12 +25,14 @@ def get_md_text_abstract(rag_answer, source = ['Arxiv Search', 'Semantic Search'
|
|
25 |
paper_link = rag_answer.links[0].href
|
26 |
download_link = rag_answer.links[1].href
|
27 |
elif 'BeWeb' in source:
|
28 |
-
title = rag_answer.
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
else:
|
35 |
raise Exception
|
36 |
|
|
|
25 |
paper_link = rag_answer.links[0].href
|
26 |
download_link = rag_answer.links[1].href
|
27 |
elif 'BeWeb' in source:
|
28 |
+
title = rag_answer['document_metadata']['title'].replace('\n','')
|
29 |
+
#score = round(rag_answer['score'], 2)
|
30 |
+
date = rag_answer['document_metadata']['_time']
|
31 |
+
paper_abs = rag_answer['content']
|
32 |
+
authors = rag_answer['document_metadata']['authors'].replace('\n','')
|
33 |
+
doc_id = rag_answer['document_id']
|
34 |
+
paper_link = f'''https://arxiv.org/abs/{doc_id}'''
|
35 |
+
download_link = f'''https://arxiv.org/pdf/{doc_id}'''
|
36 |
else:
|
37 |
raise Exception
|
38 |
|