Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -143,17 +143,15 @@ def main():
|
|
| 143 |
else:
|
| 144 |
st.subheader(f"Top Results ({search_duration:.2f}s)")
|
| 145 |
for res in results:
|
| 146 |
-
with st.expander(res
|
| 147 |
-
st.markdown(f"**Summary**: {res
|
| 148 |
-
similarity = res
|
| 149 |
st.progress(similarity)
|
| 150 |
st.markdown(f"**Confidence**: {similarity:.1%}")
|
| 151 |
-
st.markdown(f"**Authors**: {res
|
| 152 |
-
source = res
|
| 153 |
if source and is_valid_url(source):
|
| 154 |
-
st.markdown(f"[View Source]({source})")
|
| 155 |
-
elif res.get('title'):
|
| 156 |
-
st.markdown(f"[Google Scholar Search](https://scholar.google.com/scholar?q={quote(res['title'])})")
|
| 157 |
|
| 158 |
except Exception as e:
|
| 159 |
logger.error(f"Search error: {str(e)}")
|
|
|
|
| 143 |
else:
|
| 144 |
st.subheader(f"Top Results ({search_duration:.2f}s)")
|
| 145 |
for res in results:
|
| 146 |
+
with st.expander(res["title"]):
|
| 147 |
+
st.markdown(f"**Summary**: {res['summary']}")
|
| 148 |
+
similarity = res['similarity']
|
| 149 |
st.progress(similarity)
|
| 150 |
st.markdown(f"**Confidence**: {similarity:.1%}")
|
| 151 |
+
st.markdown(f"**Authors**: {res['authors']}")
|
| 152 |
+
source = res['source']
|
| 153 |
if source and is_valid_url(source):
|
| 154 |
+
st.markdown(f"[View Source]({source}) | [Google Scholar Search](https://scholar.google.com/scholar?q={quote(res['title'])})")
|
|
|
|
|
|
|
| 155 |
|
| 156 |
except Exception as e:
|
| 157 |
logger.error(f"Search error: {str(e)}")
|