Thomas Chardonnens commited on
Commit ·
b831724
1
Parent(s): f397840
just return the encrypted image string
Browse files175 unmodified lines176177178179180179180181182183182184185186224 unmodified lines411412413413414415416417175 unmodified lines with encrypted_image_path.open("wb") as encrypted_image_file: encrypted_image_file.write(encrypted_image)
# Create a truncated version of the encrypted image for display encrypted_image_short = shorten_bytes_object(encrypted_image) # Get a short representation of the encrypted image for display purposes encrypted_image_short = encrypted_image[:100] # Take first 100 bytes
return encrypted_image_short
return (resize_img(input_image), encrypted_image_short)
def send_input(user_id): """Send the encrypted input image as well as the evaluation key to the server.224 unmodified lines encrypt_button.click( encrypt, inputs=[user_id, input_image], outputs=[input_image, encrypted_input], outputs=[encrypted_input], )
# Button to send the encodings to the server using post methodapp.py+5-4