Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def search_arxiv(query, max_results=3):
|
|
47 |
|
48 |
# Extract information from each entry
|
49 |
result["title"] = entry.find("{http://www.w3.org/2005/Atom}title").text
|
50 |
-
result["abstract"] = entry.find("{http://
|
51 |
result["link"] = entry.find("{http://www.w3.org/2005/Atom}link[@title='pdf']").attrib["href"]
|
52 |
|
53 |
authors = []
|
@@ -74,7 +74,7 @@ if st.button('Substantiate'):
|
|
74 |
search_results = search_papers(user_input)
|
75 |
if search_results is not None and len(search_results) > 0:
|
76 |
with st.spinner('Searching for relevant research papers...'):
|
77 |
-
for result in search_results:
|
78 |
st.write(f"<a href='javascript:void(0)' onclick='window.open(\"{result['link']}\", \"_blank\");return false;'>{result['title']}</a>", unsafe_allow_html=True)
|
79 |
st.write(result["abstract"])
|
80 |
st.write("Authors: ", ", ".join(result["authors"]))
|
|
|
47 |
|
48 |
# Extract information from each entry
|
49 |
result["title"] = entry.find("{http://www.w3.org/2005/Atom}title").text
|
50 |
+
result["abstract"] = entry.find("{http://www.w3.org/2005/Atom}summary").text
|
51 |
result["link"] = entry.find("{http://www.w3.org/2005/Atom}link[@title='pdf']").attrib["href"]
|
52 |
|
53 |
authors = []
|
|
|
74 |
search_results = search_papers(user_input)
|
75 |
if search_results is not None and len(search_results) > 0:
|
76 |
with st.spinner('Searching for relevant research papers...'):
|
77 |
+
for result in search_results[:3]:
|
78 |
st.write(f"<a href='javascript:void(0)' onclick='window.open(\"{result['link']}\", \"_blank\");return false;'>{result['title']}</a>", unsafe_allow_html=True)
|
79 |
st.write(result["abstract"])
|
80 |
st.write("Authors: ", ", ".join(result["authors"]))
|