Spaces:
Sleeping
Sleeping
Update src/app.py
Browse files- src/app.py +17 -1
src/app.py
CHANGED
|
@@ -244,6 +244,21 @@ with st.sidebar:
|
|
| 244 |
|
| 245 |
# Model Selector
|
| 246 |
st.header("🧠 Intelligence")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
model_map = {
|
| 248 |
"Granite 4 (IBM)": "granite4:latest",
|
| 249 |
"Llama 3.2 (Meta)": "llama3.2:latest",
|
|
@@ -413,7 +428,8 @@ with tab2:
|
|
| 413 |
file_path=temp_path,
|
| 414 |
username=st.session_state.username,
|
| 415 |
index_name=st.session_state.active_index,
|
| 416 |
-
strategy=chunk_strategy
|
|
|
|
| 417 |
)
|
| 418 |
|
| 419 |
if ok:
|
|
|
|
| 244 |
|
| 245 |
# Model Selector
|
| 246 |
st.header("🧠 Intelligence")
|
| 247 |
+
|
| 248 |
+
# 1. EMBEDDING MODEL SELECTOR (New!)
|
| 249 |
+
st.subheader("1. Embeddings (The Memory)")
|
| 250 |
+
embed_options = {
|
| 251 |
+
"Standard (All-MiniLM, 384d)": "sentence-transformers/all-MiniLM-L6-v2",
|
| 252 |
+
"High-Perf (MPNet, 768d)": "sentence-transformers/all-mpnet-base-v2",
|
| 253 |
+
"OpenAI Small (1536d)": "text-embedding-3-small"
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
embed_choice_label = st.selectbox("Select Embedding Model", list(embed_options.keys()))
|
| 257 |
+
# Store the actual API string in session state
|
| 258 |
+
st.session_state.active_embed_model = embed_options[embed_choice_label]
|
| 259 |
+
|
| 260 |
+
# 2. LLM SELECTOR (The Brain)
|
| 261 |
+
st.subheader("2. Chat Model (The Brain)")
|
| 262 |
model_map = {
|
| 263 |
"Granite 4 (IBM)": "granite4:latest",
|
| 264 |
"Llama 3.2 (Meta)": "llama3.2:latest",
|
|
|
|
| 428 |
file_path=temp_path,
|
| 429 |
username=st.session_state.username,
|
| 430 |
index_name=st.session_state.active_index,
|
| 431 |
+
strategy=chunk_strategy,
|
| 432 |
+
embed_model_name=st.session_state.active_embed_model
|
| 433 |
)
|
| 434 |
|
| 435 |
if ok:
|