Spaces:
Running
on
Zero
Running
on
Zero
Fix app.py
Browse filesFix the bug where the default value of resolution cannot be used
app.py
CHANGED
@@ -55,7 +55,8 @@ model.eval()
|
|
55 |
# def predict(image_1, image_2):
|
56 |
# images = [image_1, image_2]
|
57 |
@spaces.GPU
|
58 |
-
def predict(image, resolution
|
|
|
59 |
# Image is a RGB numpy array.
|
60 |
resolution = [int(int(reso)//32*32) for reso in resolution.strip().split('x')]
|
61 |
images = [image]
|
|
|
55 |
# def predict(image_1, image_2):
|
56 |
# images = [image_1, image_2]
|
57 |
@spaces.GPU
|
58 |
+
def predict(image, resolution):
|
59 |
+
resolution = f"{image.shape[1]}x{image.shape[0]}" if resolution == '' else resolution
|
60 |
# Image is a RGB numpy array.
|
61 |
resolution = [int(int(reso)//32*32) for reso in resolution.strip().split('x')]
|
62 |
images = [image]
|