Edit default value for max tokens and providers formatting
Browse files
app.py
CHANGED
@@ -40,7 +40,6 @@ Parameters_Col, Chat_Col = st.columns([1,3])
|
|
40 |
|
41 |
with Parameters_Col:
|
42 |
|
43 |
-
# st.header("LLM Router")
|
44 |
st.image(
|
45 |
"./assets/unify_logo.png",
|
46 |
use_column_width="auto",
|
@@ -63,10 +62,10 @@ with Parameters_Col:
|
|
63 |
with st.expander("Advanced Inputs"):
|
64 |
max_tokens = st.slider(
|
65 |
label = "Maximum Number Of Tokens",
|
66 |
-
min_value=
|
67 |
-
max_value=
|
68 |
-
value=
|
69 |
-
step=
|
70 |
help = "The maximum number of tokens that can be generated."
|
71 |
)
|
72 |
temperature = st.slider(
|
@@ -137,6 +136,8 @@ with Chat_Col:
|
|
137 |
|
138 |
# Displaying model, provider, and metrics
|
139 |
provider = " ".join(chunks[0].model.split("@")[-1].split("-")).title()
|
|
|
|
|
140 |
st.markdown(f"Model: **{model}**. Provider: **{provider}**")
|
141 |
st.markdown(
|
142 |
f"**{tokens_per_second}** Tokens Per Second - \
|
@@ -152,4 +153,4 @@ with Chat_Col:
|
|
152 |
# Cancel / Stop button
|
153 |
if st.button("Clear Chat", key="clear"):
|
154 |
msgs.empty()
|
155 |
-
st.session_state.messages = []
|
|
|
40 |
|
41 |
with Parameters_Col:
|
42 |
|
|
|
43 |
st.image(
|
44 |
"./assets/unify_logo.png",
|
45 |
use_column_width="auto",
|
|
|
62 |
with st.expander("Advanced Inputs"):
|
63 |
max_tokens = st.slider(
|
64 |
label = "Maximum Number Of Tokens",
|
65 |
+
min_value=100,
|
66 |
+
max_value=2000,
|
67 |
+
value=500,
|
68 |
+
step=100,
|
69 |
help = "The maximum number of tokens that can be generated."
|
70 |
)
|
71 |
temperature = st.slider(
|
|
|
136 |
|
137 |
# Displaying model, provider, and metrics
|
138 |
provider = " ".join(chunks[0].model.split("@")[-1].split("-")).title()
|
139 |
+
if " Ai" in provider:
|
140 |
+
provider = provider.replace("Ai", "AI")
|
141 |
st.markdown(f"Model: **{model}**. Provider: **{provider}**")
|
142 |
st.markdown(
|
143 |
f"**{tokens_per_second}** Tokens Per Second - \
|
|
|
153 |
# Cancel / Stop button
|
154 |
if st.button("Clear Chat", key="clear"):
|
155 |
msgs.empty()
|
156 |
+
st.session_state.messages = []
|