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
# Image to Image API | |
import requests | |
import base64 | |
# give a path to an image on disk | |
image = open('init.png', 'rb').read() | |
bytes = base64.b64encode(image) | |
bytestr = bytes.decode('utf-8') |