Балаганский Никита Николаевич
commited on
Commit
•
aa718cd
1
Parent(s):
c07b0b4
fix latex
Browse files
app.py
CHANGED
@@ -127,7 +127,7 @@ def main():
|
|
127 |
act_type = "softmax"
|
128 |
st.write(WARNING_TEXT[language])
|
129 |
show_pos_alpha = st.checkbox("Show positive alphas", value=False)
|
130 |
-
st.markdown("""In our method, we reweight the probability of the next token with the external classifier, namely, the Attribute model. If $\alpha$ parameter is equal to zero we can see that the distribution below collapses into a simple language model without any modification. If alpha is below zero then every generation step attribute model tries to minimize the probability of the desired attribute. Otherwise, the model is forced to produce text with a higher probability of the attribute.""")
|
131 |
st.latex(r"p(x_i|x_{<i}, c) \propto p(x_i|x_{<i})p(c|x_{\leq i})^{\alpha}")
|
132 |
if act_type == "softmax":
|
133 |
alpha = st.slider("α", min_value=-40, max_value=40 if show_pos_alpha else 0, step=1, value=0)
|
|
|
127 |
act_type = "softmax"
|
128 |
st.write(WARNING_TEXT[language])
|
129 |
show_pos_alpha = st.checkbox("Show positive alphas", value=False)
|
130 |
+
st.markdown(r"""In our method, we reweight the probability of the next token with the external classifier, namely, the Attribute model. If $\alpha$ parameter is equal to zero we can see that the distribution below collapses into a simple language model without any modification. If alpha is below zero then every generation step attribute model tries to minimize the probability of the desired attribute. Otherwise, the model is forced to produce text with a higher probability of the attribute.""")
|
131 |
st.latex(r"p(x_i|x_{<i}, c) \propto p(x_i|x_{<i})p(c|x_{\leq i})^{\alpha}")
|
132 |
if act_type == "softmax":
|
133 |
alpha = st.slider("α", min_value=-40, max_value=40 if show_pos_alpha else 0, step=1, value=0)
|