Created
October 23, 2017 04:01
-
-
Save symisc/1d2434e3d9dec4ee4a4743e4d05d3ec9 to your computer and use it in GitHub Desktop.
Grayscale image colorization using deep learning models via the PixLab /colorize API endpoint. https://pixlab.io/cmd?id=colorize
This file contains hidden or 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
import requests | |
import json | |
# Colorize this 1933 picture of this little girl via: https://pixlab.io/cmd?id=colorize | |
req = requests.get('https://api.pixlab.io/colorize',params={'img':'https://i.redd.it/7z1q27vaa9tz.png','key':'My_PixLab_Key'}) | |
reply = req.json() | |
if reply['status'] != 200: | |
print (reply['error']) | |
else: | |
print ("Link to the colorized picture: "+ reply['link']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment