Thomas Chardonnens commited on
Commit ·
b831724
1
Parent(s): f397840
just return the encrypted image string
Browse files175 unmodified lines176177178179180181182183184185224 unmodified lines410411412413414415416175 unmodified lineswith encrypted_image_path.open("wb") as encrypted_image_file:encrypted_image_file.write(encrypted_image)# Create a truncated version of the encrypted image for displayencrypted_image_short = shorten_bytes_object(encrypted_image)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 linesencrypt_button.click(encrypt,inputs=[user_id, input_image],outputs=[input_image, encrypted_input],)# Button to send the encodings to the server using post method175 unmodified lines176177178179180181182183184185186224 unmodified lines411412413414415416417175 unmodified lineswith encrypted_image_path.open("wb") as encrypted_image_file:encrypted_image_file.write(encrypted_image)# Get a short representation of the encrypted image for display purposesencrypted_image_short = encrypted_image[:100] # Take first 100 bytesreturn encrypted_image_shortdef send_input(user_id):"""Send the encrypted input image as well as the evaluation key to the server.224 unmodified linesencrypt_button.click(encrypt,inputs=[user_id, input_image],outputs=[encrypted_input],)# Button to send the encodings to the server using post method
app.py+5-4