davanstrien HF staff commited on
Commit
d3c85ed
1 Parent(s): 89c8ab5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -9
app.py CHANGED
@@ -116,23 +116,31 @@ def main():
116
 
117
  # Alpha control
118
  st.sidebar.subheader("Alpha Control")
119
- col1, col2, col3 = st.sidebar.columns([1, 2, 1])
120
  with col1:
121
- st.button("", on_click=update_alpha, args=(-0.01,), key="alpha_down")
122
  with col2:
123
- st.write(f"Alpha: {st.session_state.alpha:.2f}")
124
  with col3:
 
 
125
  st.button("▲", on_click=update_alpha, args=(0.01,), key="alpha_up")
 
 
126
 
127
  # Beta control
128
  st.sidebar.subheader("Beta Control")
129
- col1, col2, col3 = st.sidebar.columns([1, 2, 1])
130
  with col1:
131
- st.button("", on_click=update_beta, args=(-0.01,), key="beta_down")
132
  with col2:
133
- st.write(f"Beta: {st.session_state.beta:.2f}")
134
  with col3:
 
 
135
  st.button("▲", on_click=update_beta, args=(0.01,), key="beta_up")
 
 
136
 
137
  col1, col2 = st.columns(2)
138
 
@@ -149,7 +157,7 @@ def main():
149
  st.pyplot(fig_images)
150
 
151
  st.caption(
152
- "Use the and buttons in the sidebar to adjust Alpha and Beta values. The red dot in the Parameter Space plot shows the current (Alpha, Beta) position."
153
  )
154
 
155
  st.markdown("""
@@ -161,9 +169,10 @@ def main():
161
  - The right plot displays the images of the interval [0,1] under repeated application of the ITM.
162
 
163
  Use the up and down arrow buttons in the sidebar to adjust the alpha and beta parameters and observe how they affect both plots.
 
 
164
  """)
165
 
166
 
167
  if __name__ == "__main__":
168
- main()
169
-
 
116
 
117
  # Alpha control
118
  st.sidebar.subheader("Alpha Control")
119
+ col1, col2, col3, col4, col5 = st.sidebar.columns([1, 1, 2, 1, 1])
120
  with col1:
121
+ st.button("▼▼", on_click=update_alpha, args=(-0.1,), key="alpha_down_large")
122
  with col2:
123
+ st.button("▼", on_click=update_alpha, args=(-0.01,), key="alpha_down")
124
  with col3:
125
+ st.write(f"Alpha: {st.session_state.alpha:.2f}")
126
+ with col4:
127
  st.button("▲", on_click=update_alpha, args=(0.01,), key="alpha_up")
128
+ with col5:
129
+ st.button("▲▲", on_click=update_alpha, args=(0.1,), key="alpha_up_large")
130
 
131
  # Beta control
132
  st.sidebar.subheader("Beta Control")
133
+ col1, col2, col3, col4, col5 = st.sidebar.columns([1, 1, 2, 1, 1])
134
  with col1:
135
+ st.button("▼▼", on_click=update_beta, args=(-0.1,), key="beta_down_large")
136
  with col2:
137
+ st.button("▼", on_click=update_beta, args=(-0.01,), key="beta_down")
138
  with col3:
139
+ st.write(f"Beta: {st.session_state.beta:.2f}")
140
+ with col4:
141
  st.button("▲", on_click=update_beta, args=(0.01,), key="beta_up")
142
+ with col5:
143
+ st.button("▲▲", on_click=update_beta, args=(0.1,), key="beta_up_large")
144
 
145
  col1, col2 = st.columns(2)
146
 
 
157
  st.pyplot(fig_images)
158
 
159
  st.caption(
160
+ "Use the ▲/▲▲ and ▼/▼▼ buttons in the sidebar to adjust Alpha and Beta values. The red dot in the Parameter Space plot shows the current (Alpha, Beta) position."
161
  )
162
 
163
  st.markdown("""
 
169
  - The right plot displays the images of the interval [0,1] under repeated application of the ITM.
170
 
171
  Use the up and down arrow buttons in the sidebar to adjust the alpha and beta parameters and observe how they affect both plots.
172
+ - Single arrows (▲/▼) change values by 0.01
173
+ - Double arrows (▲▲/▼▼) change values by 0.1
174
  """)
175
 
176
 
177
  if __name__ == "__main__":
178
+ main()