Spaces:
Sleeping
Sleeping
fix default indexes
Browse files- streamlit_app.py +1 -2
streamlit_app.py
CHANGED
@@ -257,8 +257,7 @@ with st.sidebar:
|
|
257 |
"Model:",
|
258 |
options=OPENAI_MODELS + list(OPEN_MODELS.keys()),
|
259 |
index=(OPENAI_MODELS + list(OPEN_MODELS.keys())).index(
|
260 |
-
|
261 |
-
OPENAI_MODELS + list(OPEN_MODELS.keys())).index(os.environ["DEFAULT_MODEL"]),
|
262 |
placeholder="Select model",
|
263 |
help="Select the LLM model:",
|
264 |
disabled=st.session_state['doc_id'] is not None or st.session_state['uploaded']
|
|
|
257 |
"Model:",
|
258 |
options=OPENAI_MODELS + list(OPEN_MODELS.keys()),
|
259 |
index=(OPENAI_MODELS + list(OPEN_MODELS.keys())).index(
|
260 |
+
os.environ["DEFAULT_MODEL"]) if "DEFAULT_MODEL" not in os.environ or not os.environ["DEFAULT_MODEL"] else 0,
|
|
|
261 |
placeholder="Select model",
|
262 |
help="Select the LLM model:",
|
263 |
disabled=st.session_state['doc_id'] is not None or st.session_state['uploaded']
|