Skip to content

Commit ddeea6d

Browse files
authored
Update toonify.py
1 parent e406bd8 commit ddeea6d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ToonifyImage/toonify.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import requests
22
import shutil # to save image locally
3+
# taking the path of image
34
imagePath=input("Please enter the path of image to toonify : ")
5+
#taking api key
46
api_key=input("Please enter your api key")
7+
# using python request module to fetch the data
58
r = requests.post(
69
"https://api.deepai.org/api/toonify",
710
files={
@@ -10,6 +13,7 @@
1013
headers={'api-key': api_key}
1114
)
1215
y=r.json()
16+
# fetching the path of the image formed from json which we have got
1317
image_url=y['output_url']
1418
filename = image_url.split("/")[-1]
1519
# Open the url image

0 commit comments

Comments
 (0)