bhavitvyamalik commited on
Commit
0c7ca41
1 Parent(s): 47121bf

parameters beta_expander bug fix

Browse files
Files changed (1) hide show
  1. apps/mic.py +6 -6
apps/mic.py CHANGED
@@ -31,12 +31,12 @@ def app(state):
31
  max_length = 64
32
 
33
  with st.sidebar.beta_expander('Generation Parameters'):
34
- do_sample = st.sidebar.checkbox("Sample", value=False, help="Sample from the model instead of using beam search.")
35
- top_k = st.sidebar.number_input("Top K", min_value=10, max_value=200, value=50, step=1, help="The number of highest probability vocabulary tokens to keep for top-k-filtering.")
36
- num_beams = st.sidebar.number_input(label="Number of Beams", min_value=2, max_value=10, value=4, step=1, help="Number of beams to be used in beam search.")
37
- temperature = st.sidebar.select_slider(label="Temperature", options = list(np.arange(0.0,1.1, step=0.1)), value=1.0, help ="The value used to module the next token probabilities.", format_func=lambda x: f"{x:.2f}")
38
- top_p = st.sidebar.select_slider(label = "Top-P", options = list(np.arange(0.0,1.1, step=0.1)),value=1.0, help="Nucleus Sampling : If set to float < 1, only the most probable tokens with probabilities that add up to :obj:`top_p` or higher are kept for generation.", format_func=lambda x: f"{x:.2f}")
39
- if st.sidebar.button("Clear All Cache"):
40
  caching.clear_cache()
41
 
42
 
 
31
  max_length = 64
32
 
33
  with st.sidebar.beta_expander('Generation Parameters'):
34
+ do_sample = st.checkbox("Sample", value=False, help="Sample from the model instead of using beam search.")
35
+ top_k = st.number_input("Top K", min_value=10, max_value=200, value=50, step=1, help="The number of highest probability vocabulary tokens to keep for top-k-filtering.")
36
+ num_beams = st.number_input(label="Number of Beams", min_value=2, max_value=10, value=4, step=1, help="Number of beams to be used in beam search.")
37
+ temperature = st.select_slider(label="Temperature", options = list(np.arange(0.0,1.1, step=0.1)), value=1.0, help ="The value used to module the next token probabilities.", format_func=lambda x: f"{x:.2f}")
38
+ top_p = st.select_slider(label = "Top-P", options = list(np.arange(0.0,1.1, step=0.1)),value=1.0, help="Nucleus Sampling : If set to float < 1, only the most probable tokens with probabilities that add up to :obj:`top_p` or higher are kept for generation.", format_func=lambda x: f"{x:.2f}")
39
+ if st.button("Clear All Cache"):
40
  caching.clear_cache()
41
 
42