Spaces:
Runtime error
Runtime error
Commit
•
0b56c75
1
Parent(s):
3a1adec
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,19 @@ shutil.move("HairFastGAN/input", "input")
|
|
19 |
|
20 |
shutil.rmtree("HairFastGAN")
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
hair_fast = HairFast(get_parser().parse_args([]))
|
25 |
|
|
|
19 |
|
20 |
shutil.rmtree("HairFastGAN")
|
21 |
|
22 |
+
directory_path = 'pretrained_models'
|
23 |
+
# Iterate over each entry in the directory
|
24 |
+
for entry in os.listdir(directory_path):
|
25 |
+
# Create full path to the entry
|
26 |
+
full_path = os.path.join(directory_path, entry)
|
27 |
+
# Check if it's a file
|
28 |
+
if os.path.isfile(full_path):
|
29 |
+
# Get the file size
|
30 |
+
size = os.path.getsize(full_path)
|
31 |
+
# Print file name and its size in bytes
|
32 |
+
print(f"{entry}: {size} bytes")
|
33 |
+
|
34 |
+
from HairFastGAN.hair_swap import HairFast, get_parser
|
35 |
|
36 |
hair_fast = HairFast(get_parser().parse_args([]))
|
37 |
|