Skip to content

Instantly share code, notes, and snippets.

@Paulescu
Created March 15, 2022 10:20
Show Gist options
  • Save Paulescu/2b42f4491a45e6b9658bb9bb8885e61e to your computer and use it in GitHub Desktop.
Save Paulescu/2b42f4491a45e6b9658bb9bb8885e61e to your computer and use it in GitHub Desktop.
for x_adv, grad in iterator:
st.markdown(f'## Step {counter}')
# get model predictions
prediction_adv = predict(model, x_adv)
# print them
caption_adv = f'= {prediction_adv["label"]} \n {prediction_adv["confidence"]:.0%}'
st.image([x_adv, grad, x_adv], width=image_width, caption=['', f'* {epsilon}', caption_adv], output_format='JPEG')
counter += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment