Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,10 @@ from tqdm import tqdm # Added for embedding progress
|
|
| 13 |
import chromadb.utils.embedding_functions as embedding_functions
|
| 14 |
# from sentence_transformers import CrossEncoder # Keep if re-ranking might be used
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# --- Configuration ---
|
| 17 |
DB_PATH = "./chroma_db"
|
| 18 |
COLLECTION_NAME = "libguides_content" # Must match the embedding script
|
|
@@ -300,8 +304,8 @@ Answer:"""
|
|
| 300 |
return prompt
|
| 301 |
|
| 302 |
# --- Streamlit App UI ---
|
| 303 |
-
st.set_page_config(layout="wide")
|
| 304 |
-
st.title("📚 Ask the Library Guides (Local Embed + HF Gen)")
|
| 305 |
|
| 306 |
# Load resources (this now includes the initialization check)
|
| 307 |
collection = load_chromadb_collection()
|
|
|
|
| 13 |
import chromadb.utils.embedding_functions as embedding_functions
|
| 14 |
# from sentence_transformers import CrossEncoder # Keep if re-ranking might be used
|
| 15 |
|
| 16 |
+
# --- Page Config (Must be first Streamlit command) ---
|
| 17 |
+
st.set_page_config(layout="wide")
|
| 18 |
+
# ---
|
| 19 |
+
|
| 20 |
# --- Configuration ---
|
| 21 |
DB_PATH = "./chroma_db"
|
| 22 |
COLLECTION_NAME = "libguides_content" # Must match the embedding script
|
|
|
|
| 304 |
return prompt
|
| 305 |
|
| 306 |
# --- Streamlit App UI ---
|
| 307 |
+
# st.set_page_config(layout="wide") # MOVED TO TOP
|
| 308 |
+
st.title("📚 Ask the Library Guides (Local Embed + HF Gen)") # Updated title
|
| 309 |
|
| 310 |
# Load resources (this now includes the initialization check)
|
| 311 |
collection = load_chromadb_collection()
|