Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,6 +61,7 @@ detect = gr.Interface(
|
|
61 |
|
62 |
def upload_files(files):
|
63 |
if not os.path.exists(os.path.join(os.getcwd(), "temp")):
|
|
|
64 |
os.mkdir(os.path.join(os.getcwd(), "temp"))
|
65 |
for file in files:
|
66 |
shutil.move(file.name, os.path.join(os.getcwd(), "temp", file.name.split('\\')[-1]))
|
@@ -78,6 +79,7 @@ with gr.Blocks() as upload:
|
|
78 |
def load_image():
|
79 |
global i, imgs
|
80 |
images = os.listdir(os.path.join(os.getcwd(), "temp"))
|
|
|
81 |
imgs = []
|
82 |
for image in images:
|
83 |
faces, id = extract_faces(detector, os.path.join(os.getcwd(), "temp", image))
|
|
|
61 |
|
62 |
def upload_files(files):
|
63 |
if not os.path.exists(os.path.join(os.getcwd(), "temp")):
|
64 |
+
print("Folder Created!")
|
65 |
os.mkdir(os.path.join(os.getcwd(), "temp"))
|
66 |
for file in files:
|
67 |
shutil.move(file.name, os.path.join(os.getcwd(), "temp", file.name.split('\\')[-1]))
|
|
|
79 |
def load_image():
|
80 |
global i, imgs
|
81 |
images = os.listdir(os.path.join(os.getcwd(), "temp"))
|
82 |
+
print(len(images))
|
83 |
imgs = []
|
84 |
for image in images:
|
85 |
faces, id = extract_faces(detector, os.path.join(os.getcwd(), "temp", image))
|