Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +4 -3
src/streamlit_app.py
CHANGED
|
@@ -200,6 +200,9 @@ def get_rewritten_query(user_query):
|
|
| 200 |
# "similarity": row[4]
|
| 201 |
# })
|
| 202 |
# return docs
|
|
|
|
|
|
|
|
|
|
| 203 |
# ββ COMBINED: full retrieval pipeline ββββββββββββββββββββββ
|
| 204 |
def retrieve_documents(query, top_k=10):
|
| 205 |
# 1. Get 4x summaries
|
|
@@ -216,9 +219,7 @@ def retrieve_documents(query, top_k=10):
|
|
| 216 |
docs = fetch_chunks_by_ids(selected_ids)
|
| 217 |
return docs
|
| 218 |
|
| 219 |
-
|
| 220 |
-
st.error(f"Retrieve error: {e}")
|
| 221 |
-
return []
|
| 222 |
|
| 223 |
def clean_chunk_id(cid: str) -> str:
|
| 224 |
cid = re.sub(r'_chunk.*$', '', cid)
|
|
|
|
| 200 |
# "similarity": row[4]
|
| 201 |
# })
|
| 202 |
# return docs
|
| 203 |
+
# except Exception as e:
|
| 204 |
+
# st.error(f"Retrieve error: {e}")
|
| 205 |
+
# return []
|
| 206 |
# ββ COMBINED: full retrieval pipeline ββββββββββββββββββββββ
|
| 207 |
def retrieve_documents(query, top_k=10):
|
| 208 |
# 1. Get 4x summaries
|
|
|
|
| 219 |
docs = fetch_chunks_by_ids(selected_ids)
|
| 220 |
return docs
|
| 221 |
|
| 222 |
+
|
|
|
|
|
|
|
| 223 |
|
| 224 |
def clean_chunk_id(cid: str) -> str:
|
| 225 |
cid = re.sub(r'_chunk.*$', '', cid)
|