Awesome-Python-Scripts/Toonify/toonify-API-2.py
Chetan Pandey cef99f37d3
Toonify Scripts (#154)
* Toonify Script Added

* Update README.md

* Update toonify-API-2.py
2020-10-05 13:25:29 +05:30

19 lines
418 B
Python

import argparse
import requests
aq = argparse.ArgumentParser()
aq.add_argument('-i', '--input', required=True, help="input image link")
aq.add_argument('-k', '--apikey', required=True, help="api-key")
args = vars(aq.parse_args())
r = requests.post(
"https://api.deepai.org/api/toonify",
files={
'image': args['input'],
},
headers={'api-key': args['apikey']}
)
print(r.json()['output_url'])