fffiloni commited on
Commit
82002ed
1 Parent(s): c3d5a7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -44,6 +44,7 @@ def pix2pix(
44
  generator = torch.Generator("cuda").manual_seed(seed)
45
 
46
  try:
 
47
  ratio = min(height / image.height, width / image.width)
48
  image = image.resize((int(image.width * ratio), int(image.height * ratio)), Image.LANCZOS)
49
 
 
44
  generator = torch.Generator("cuda").manual_seed(seed)
45
 
46
  try:
47
+ image = Image.open(image)
48
  ratio = min(height / image.height, width / image.width)
49
  image = image.resize((int(image.width * ratio), int(image.height * ratio)), Image.LANCZOS)
50