jamino30 commited on
Commit
00710e8
1 Parent(s): de50edd

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -37,3 +37,4 @@ style_images/Scream.jpg filter=lfs diff=lfs merge=lfs -text
37
  style_images/StarryNight.jpg filter=lfs diff=lfs merge=lfs -text
38
  content_images/Scream.jpg filter=lfs diff=lfs merge=lfs -text
39
  style_images/Mosaic.jpg filter=lfs diff=lfs merge=lfs -text
 
 
37
  style_images/StarryNight.jpg filter=lfs diff=lfs merge=lfs -text
38
  content_images/Scream.jpg filter=lfs diff=lfs merge=lfs -text
39
  style_images/Mosaic.jpg filter=lfs diff=lfs merge=lfs -text
40
+ style_images/Starry_Night.jpg filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import time
2
  from PIL import Image
3
  from tqdm import tqdm
@@ -74,17 +75,8 @@ def save_img(img, original_size):
74
  return img
75
 
76
 
77
- style_options = {
78
- # famous paintings
79
- 'Starry Night': 'StarryNight.jpg',
80
- 'Great Wave': 'GreatWave.jpg',
81
- 'Scream': 'Scream.jpg',
82
- # styles
83
- 'Lego Bricks': 'LegoBricks.jpg',
84
- 'Oil Painting': 'OilPainting.jpg',
85
- 'Mosaic': 'Mosaic.jpg'
86
- }
87
- style_options = {k: f'./style_images/{v}' for k, v in style_options.items()}
88
 
89
  @spaces.GPU(duration=30)
90
  def inference(content_image, style_image, style_strength, output_quality, progress=gr.Progress(track_tqdm=True)):
 
1
+ import os
2
  import time
3
  from PIL import Image
4
  from tqdm import tqdm
 
75
  return img
76
 
77
 
78
+ style_files = os.listdir('./style_images')
79
+ style_options = {' '.join(style_file.split('.')[0].split('_')): f'./style_images/{style_file}' for style_file in style_files}
 
 
 
 
 
 
 
 
 
80
 
81
  @spaces.GPU(duration=30)
82
  def inference(content_image, style_image, style_strength, output_quality, progress=gr.Progress(track_tqdm=True)):
style_images/Great_Wave.jpg ADDED
style_images/Lego_Bricks.jpg ADDED
style_images/Oil_Painting.jpg ADDED
style_images/Starry_Night.jpg ADDED

Git LFS Details

  • SHA256: f8bc3528387e78692bb36b32a8e77e8c18f55eec47b9f1bba4af23be198d08c0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.29 MB