Testys commited on
Commit
a4cd871
·
1 Parent(s): f9e4fd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -18
app.py CHANGED
@@ -200,24 +200,8 @@ def main():
200
  unsafe_allow_html=True
201
  )
202
  st.progress(float(row['similarity']))
203
-
204
- # Safe URL handling
205
- if row['source']:
206
- src_lower = row['source'].lower()
207
- if "cord" in src_lower:
208
- # Link to a CORD-19 search page; adjust the URL as needed
209
- url = "https://www.semanticscholar.org/search"
210
- elif "arxiv" in src_lower:
211
- # Link to the arXiv search page
212
- url = "https://arxiv.org/search/"
213
- else:
214
- url = row['source']
215
- if is_valid_url(url):
216
- st.markdown(
217
- f"<a class='source-link' href='{url}' target='_blank' rel='noopener noreferrer'>"
218
- f"🌐 View Source</a>",
219
- unsafe_allow_html=True
220
- )
221
  else:
222
  st.warning("Invalid source URL")
223
  else:
 
200
  unsafe_allow_html=True
201
  )
202
  st.progress(float(row['similarity']))
203
+ if row['source']:
204
+ st.markdown(row['source'], unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  else:
206
  st.warning("Invalid source URL")
207
  else: