Балаганский Никита Николаевич commited on
Commit
cf0fa8b
1 Parent(s): 8e6ce41

update scatter

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -108,7 +108,7 @@ def main():
108
  target_label_id = 1
109
  prompt = st.text_input(TEXT_PROMPT_LABEL[language], PROMPT_EXAMPLE[language])
110
  alpha = st.slider("Alpha", min_value=-10, max_value=10, step=1, value=0)
111
- entropy_threshold = st.slider("Entropy threshold", min_value=0., max_value=5., step=.1, value=2.)
112
  plot_idx = np.argmin(np.abs(entropy_threshold - x_s))
113
  scatter_tip = go.Scatter({
114
  "x": [x_s[plot_idx]],
@@ -126,7 +126,7 @@ def main():
126
  })
127
  figure = go.Figure(data=[scatter, scatter_tip, scatter_tip_lines], layout=layout)
128
  figure.update_layout(paper_bgcolor="#FFFFFF", plot_bgcolor='#FFFFFF', showlegend=False)
129
- st.plotly_chart(figure)
130
  auth_token = os.environ.get('TOKEN') or True
131
  fp16 = st.checkbox("FP16", value=True)
132
  with st.spinner('Running inference...'):
 
108
  target_label_id = 1
109
  prompt = st.text_input(TEXT_PROMPT_LABEL[language], PROMPT_EXAMPLE[language])
110
  alpha = st.slider("Alpha", min_value=-10, max_value=10, step=1, value=0)
111
+ entropy_threshold = st.slider("Entropy threshold", min_value=0., max_value=10., step=.1, value=2.)
112
  plot_idx = np.argmin(np.abs(entropy_threshold - x_s))
113
  scatter_tip = go.Scatter({
114
  "x": [x_s[plot_idx]],
 
126
  })
127
  figure = go.Figure(data=[scatter, scatter_tip, scatter_tip_lines], layout=layout)
128
  figure.update_layout(paper_bgcolor="#FFFFFF", plot_bgcolor='#FFFFFF', showlegend=False)
129
+ st.plotly_chart(figure, use_container_width=True)
130
  auth_token = os.environ.get('TOKEN') or True
131
  fp16 = st.checkbox("FP16", value=True)
132
  with st.spinner('Running inference...'):