Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# st.text_input to read url from text box.
default_url = ''
url = st.text_input('Introduce URL of the initial image 👇🏼', default_url)
# FGSM parameters
# st.slider to select parameter within fixed ranges.
# by adding 'sidebar' you get the sliders on a sidebar menu on the left of the screen.
epsilon = st.sidebar.slider('Step size', min_value=0.0, max_value=0.25,
step=0.01, value=0.09, format="%.3f")
alpha = st.sidebar.slider('Max perturbation', min_value=0.00, max_value=0.250,
step=0.001, value=0.025, format="%.3f")
n_steps = st.sidebar.number_input('Number of steps', step=1, min_value=1,
max_value=50, value=9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment