Testys commited on
Commit
73b3f14
·
1 Parent(s): 4c7de63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
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.get('title', 'Untitled')):
147
- st.markdown(f"**Summary**: {res.get('summary', '')}")
148
- similarity = res.get('similarity', 0)
149
  st.progress(similarity)
150
  st.markdown(f"**Confidence**: {similarity:.1%}")
151
- st.markdown(f"**Authors**: {res.get('authors', '')}")
152
- source = res.get('source', '')
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)}")