Created
March 15, 2022 09:56
-
-
Save Paulescu/dba717e0923a5e88eebcfe03f4a0439c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# st.text_input to read url from text box. | |
default_url = 'https://github.com/Paulescu/adversarial-machine-learning/blob/main/images/dog.jpg?raw=true' | |
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