Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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