SAMBOOM commited on
Commit
9259c08
1 Parent(s): 21e669e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -42,10 +42,19 @@ message_input = st.text_input("You:", "")
42
  system_prompt_input = st.text_input("System Prompt:", "You are a helpful assistant.")
43
 
44
  # Create sliders for temperature, max new tokens, top-p, and repetition penalty
45
- temperature_slider = st.slider("Temperature", 0.0, 1.0, 0.9)
46
- max_new_tokens_slider = st.slider("Max new tokens", 0, 1048, 256)
47
- top_p_slider = st.slider("Top-p (nucleus sampling)", 0.0, 1.0, 0.95)
48
- repetition_penalty_slider = st.slider("Repetition penalty", 1.0, 2.0, 1.0)
 
 
 
 
 
 
 
 
 
49
 
50
  # Create button to generate response
51
  if st.button("Generate"):
 
42
  system_prompt_input = st.text_input("System Prompt:", "You are a helpful assistant.")
43
 
44
  # Create sliders for temperature, max new tokens, top-p, and repetition penalty
45
+ temperature_slider = st.slider("Temperature", 0.0, 1.0, 0.9, key="temperature_slider")
46
+ max_new_tokens_slider = st.slider("Max new tokens", 0, 1048, 256, key="max_new_tokens_slider")
47
+ top_p_slider = st.slider("Top-p (nucleus sampling)", 0.0, 1.0, 0.95, key="top_p_slider")
48
+ repetition_penalty_slider = st.slider("Repetition penalty", 1.0, 2.0, 1.0, key="repetition_penalty_slider")
49
+
50
+ # Create a container for the sliders
51
+ slider_container = st.container()
52
+
53
+ # Add the sliders to the container
54
+ slider_container.columns([1, 1, 1, 1])[0].slider("Temperature", 0.0, 1.0, 0.9, key="temperature_slider_left")
55
+ slider_container.columns([1, 1, 1, 1])[1].slider("Max new tokens", 0, 1048, 256, key="max_new_tokens_slider_left")
56
+ slider_container.columns([1, 1, 1, 1])[2].slider("Top-p (nucleus sampling)", 0.0, 1.0, 0.95, key="top_p_slider_left")
57
+ slider_container.columns([1, 1, 1, 1])[3].slider("Repetition penalty", 1.0, 2.0, 1.0, key="repetition_penalty_slider_left")
58
 
59
  # Create button to generate response
60
  if st.button("Generate"):