forked from TeamCookCaps/ImageClassification
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemove.py
More file actions
28 lines (23 loc) · 723 Bytes
/
Remove.py
File metadata and controls
28 lines (23 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Set your Cloudinary credentials
# ==============================
import cloudinary.api
import cloudinary
from dotenv import load_dotenv
load_dotenv()
# Import the Cloudinary libraries
# ==============================
# config
config = cloudinary.config(secure=False)
class Remove():
def __init__(self, img_list):
self.img_list = img_list
# 클클라우드 서버의 이미지 삭제
def remove_cloudinary(self):
print("클라우드 서버의 이미지 삭제")
try:
response = cloudinary.api.delete_resources(self.img_list)
print(response)
return response
except:
response = "error image remove"
return response