Балаганский Никита Николаевич commited on
Commit
8f9df38
1 Parent(s): c1b38d2
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -141,7 +141,10 @@ def main():
141
  show_pos_alpha = st.checkbox("Show positive alphas", value=False)
142
  prompt = st.text_input(TEXT_PROMPT_LABEL[language], PROMPT_EXAMPLE[language])
143
  st.latex(r"p(x_i|x_{<i}, c) \propto p(x_i|x_{<i})p(c|x_{\leq i})^{\alpha}")
144
- alpha = st.slider("α", min_value=-20, max_value=20 if show_pos_alpha else 0, step=1, value=0)
 
 
 
145
  entropy_threshold = st.slider("Entropy threshold", min_value=0., max_value=10., step=.1, value=2.)
146
  plot_idx = np.argmin(np.abs(entropy_threshold - x_s))
147
  scatter_tip = go.Scatter({
 
141
  show_pos_alpha = st.checkbox("Show positive alphas", value=False)
142
  prompt = st.text_input(TEXT_PROMPT_LABEL[language], PROMPT_EXAMPLE[language])
143
  st.latex(r"p(x_i|x_{<i}, c) \propto p(x_i|x_{<i})p(c|x_{\leq i})^{\alpha}")
144
+ if act_type == "softmax":
145
+ alpha = st.slider("α", min_value=-100, max_value=100 if show_pos_alpha else 0, step=1, value=0)
146
+ else:
147
+ alpha = st.slider("α", min_value=-10, max_value=10 if show_pos_alpha else 0, step=1, value=0)
148
  entropy_threshold = st.slider("Entropy threshold", min_value=0., max_value=10., step=.1, value=2.)
149
  plot_idx = np.argmin(np.abs(entropy_threshold - x_s))
150
  scatter_tip = go.Scatter({