SIGMitch commited on
Commit
ec949f6
·
verified ·
1 Parent(s): ab40352

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -47,18 +47,18 @@ def resize_image_dimensions(
47
  # height = height - (height % 32)
48
  # return width, height
49
 
50
- if width > height:
51
- scaling_factor = maximum_dimension / width
52
- else:
53
- scaling_factor = maximum_dimension / height
54
 
55
- new_width = int(width * scaling_factor)
56
- new_height = int(height * scaling_factor)
57
 
58
- new_width = new_width - (new_width % 32)
59
- new_height = new_height - (new_height % 32)
60
 
61
- return new_width, new_height
62
 
63
 
64
  @spaces.GPU(duration=80)
 
47
  # height = height - (height % 32)
48
  # return width, height
49
 
50
+ # if width > height:
51
+ # scaling_factor = maximum_dimension / width
52
+ # else:
53
+ # scaling_factor = maximum_dimension / height
54
 
55
+ # new_width = int(width * scaling_factor)
56
+ # new_height = int(height * scaling_factor)
57
 
58
+ # new_width = new_width - (new_width % 32)
59
+ # new_height = new_height - (new_height % 32)
60
 
61
+ return width, height
62
 
63
 
64
  @spaces.GPU(duration=80)