Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -402,10 +402,23 @@ if collection and st.button("Ask"):
|
|
402 |
events_url = "https://gc-cuny.libcal.com/calendar?cid=15537&t=d&d=0000-00-00&cal=15537&inc=0"
|
403 |
st.info(f"You can find information about upcoming library events and workshops on the calendar here: [{events_url}]({events_url})")
|
404 |
st.stop()
|
405 |
-
# Add other direct routes here
|
406 |
-
|
407 |
-
|
408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
409 |
|
410 |
# --- Proceed with RAG/Research Query if not handled above ---
|
411 |
if route_decision in ["RAG", "RESEARCH_QUERY"]: # Only proceed if it's a general or research query
|
@@ -538,7 +551,7 @@ st.sidebar.header("About This Demo")
|
|
538 |
st.sidebar.info(
|
539 |
"This is an experimental RAG demo for the CUNY Graduate Center Library (Mina Rees Library).\n\n"
|
540 |
"1. Loads pre-computed embeddings from a Hugging Face Dataset.\n"
|
541 |
-
"2. Embeds user
|
542 |
"3. Uses the Hugging Face Inference API for LLM generation.\n"
|
543 |
"4. Requires a `HUGGING_FACE_HUB_TOKEN` (set as Space secret `HF_TOKEN` or in `.env`)."
|
544 |
)
|
|
|
402 |
events_url = "https://gc-cuny.libcal.com/calendar?cid=15537&t=d&d=0000-00-00&cal=15537&inc=0"
|
403 |
st.info(f"You can find information about upcoming library events and workshops on the calendar here: [{events_url}]({events_url})")
|
404 |
st.stop()
|
405 |
+
# Add other direct routes here
|
406 |
+
elif route_decision == "CATALOG_SEARCH":
|
407 |
+
catalog_url = "https://cuny-gc.primo.exlibrisgroup.com/discovery/search?vid=01CUNY_GC:CUNY_GC"
|
408 |
+
st.info(f"To check for specific books, journals, or articles, please search the library catalog directly here: [{catalog_url}]({catalog_url})")
|
409 |
+
st.stop() # Stop execution for this query
|
410 |
+
elif route_decision == "ILL_REQUEST":
|
411 |
+
ill_url = "https://ezproxy.gc.cuny.edu/login?url=https://gc-cuny.illiad.oclc.org/illiad/illiad.dll"
|
412 |
+
st.info(f"For Interlibrary Loan requests or questions, please use the ILL system here: [{ill_url}]({ill_url})")
|
413 |
+
st.stop()
|
414 |
+
elif route_decision == "ACCOUNT_INFO":
|
415 |
+
account_url = "https://cuny-gc.primo.exlibrisgroup.com/discovery/account?vid=01CUNY_GC:CUNY_GC§ion=overview"
|
416 |
+
st.info(f"To manage your library account (renewals, fines, etc.), please log in here: [{account_url}]({account_url})")
|
417 |
+
st.stop()
|
418 |
+
elif route_decision == "TECH_SUPPORT":
|
419 |
+
support_url = "https://docs.google.com/forms/d/e/1FAIpQLSdF3a-Au-jIYRDN-mxU3MpZSANQJWFx0VEN2if01iRucIXsZA/viewform" # Assuming this is the correct form
|
420 |
+
st.info(f"To report a problem with accessing e-resources or other technical issues, please use this form: [{support_url}]({support_url})")
|
421 |
+
st.stop()
|
422 |
|
423 |
# --- Proceed with RAG/Research Query if not handled above ---
|
424 |
if route_decision in ["RAG", "RESEARCH_QUERY"]: # Only proceed if it's a general or research query
|
|
|
551 |
st.sidebar.info(
|
552 |
"This is an experimental RAG demo for the CUNY Graduate Center Library (Mina Rees Library).\n\n"
|
553 |
"1. Loads pre-computed embeddings from a Hugging Face Dataset.\n"
|
554 |
+
"2. Embeds user que ries locally.\n"
|
555 |
"3. Uses the Hugging Face Inference API for LLM generation.\n"
|
556 |
"4. Requires a `HUGGING_FACE_HUB_TOKEN` (set as Space secret `HF_TOKEN` or in `.env`)."
|
557 |
)
|