Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -571,12 +571,13 @@ image_urls = [
|
|
571 |
"https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/cmCZ5RTdSx3usMm7MwwWK.png",
|
572 |
]
|
573 |
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
st.
|
579 |
-
|
|
|
580 |
st.sidebar.write("Failed to load the image.")
|
581 |
|
582 |
# Ensure the directory for storing scores exists
|
@@ -1387,10 +1388,12 @@ if example_input:
|
|
1387 |
# Search AI
|
1388 |
query=example_input
|
1389 |
if query:
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
|
|
|
|
1394 |
|
1395 |
st.write("Search history:")
|
1396 |
for example_input in session_state["search_queries"]:
|
|
|
571 |
"https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/cmCZ5RTdSx3usMm7MwwWK.png",
|
572 |
]
|
573 |
|
574 |
+
try:
|
575 |
+
selected_image_url = random.choice(image_urls)
|
576 |
+
selected_image_base64 = get_image_as_base64(selected_image_url)
|
577 |
+
if selected_image_base64 is not None:
|
578 |
+
with st.sidebar:
|
579 |
+
st.markdown(f"")
|
580 |
+
except:
|
581 |
st.sidebar.write("Failed to load the image.")
|
582 |
|
583 |
# Ensure the directory for storing scores exists
|
|
|
1388 |
# Search AI
|
1389 |
query=example_input
|
1390 |
if query:
|
1391 |
+
try:
|
1392 |
+
result = search_arxiv(query)
|
1393 |
+
#search_glossary(query)
|
1394 |
+
search_glossary(result)
|
1395 |
+
except:
|
1396 |
+
st.markdown(' ')
|
1397 |
|
1398 |
st.write("Search history:")
|
1399 |
for example_input in session_state["search_queries"]:
|