File size: 688 Bytes
e5b3236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
    )