multimodalart HF staff commited on
Commit
c21edc5
1 Parent(s): c2be452

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -15
app.py CHANGED
@@ -20,21 +20,16 @@ shutil.move("HairFastGAN/input", "input")
20
 
21
  shutil.rmtree("HairFastGAN")
22
 
23
- directory_path = 'pretrained_models'
24
- # Iterate over each entry in the directory
25
- for entry in os.listdir(directory_path):
26
- # Create full path to the entry
27
- full_path = os.path.join(directory_path, entry)
28
- # Check if it's a file
29
- if os.path.isfile(full_path):
30
- # Get the file size
31
- size = os.path.getsize(full_path)
32
- # Print file name and its size in bytes
33
- print(f"{entry}: {size} bytes")
34
-
35
- hairfastgan_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'HairFastGAN')
36
- print(hairfastgan_path)
37
- sys.path.append(hairfastgan_path)
38
  from hair_swap import HairFast, get_parser
39
 
40
  hair_fast = HairFast(get_parser().parse_args([]))
 
20
 
21
  shutil.rmtree("HairFastGAN")
22
 
23
+ items = os.listdir()
24
+
25
+ for item in items:
26
+ print(item)
27
+ shutil.move(item, os.path.join('..', item))
28
+
29
+ os.chdir("..")
30
+
31
+ shutil.rmtree("HairFastGAN")
32
+
 
 
 
 
 
33
  from hair_swap import HairFast, get_parser
34
 
35
  hair_fast = HairFast(get_parser().parse_args([]))