Spaces:
Running
Running
import streamlit as st | |
def model_settings(session_state,config): | |
CHAT_BOTS = config["CHAT_BOTS"] | |
st.markdown("# Model Settings") | |
session_state.chat_bot = st.sidebar.radio( | |
"Select one:", [key for key, _ in CHAT_BOTS.items()] | |
) | |
session_state.temp = st.slider( | |
label="Temperature", min_value=0.0, max_value=1.0, step=0.1, value=0.9 | |
) | |
session_state.max_tokens = st.slider( | |
label="New tokens to generate", | |
min_value=64, | |
max_value=2048, | |
step=32, | |
value=512, | |
) | |
session_state.repetion_penalty = st.slider( | |
label="Repetion Penalty", min_value=0.0, max_value=1.0, step=0.1, value=1.0 | |
) |