Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
|