Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -270,7 +270,7 @@ def preprocess_openpose(image):
|
|
270 |
image = openpose_processor(image, hand_and_face=False, output_type='cv2')
|
271 |
height, width = image.shape[:2]
|
272 |
ratio = np.sqrt(1024. * 1024. / (width * height))
|
273 |
-
new_width, new_height = int(width * ratio), int
|
274 |
image = cv2.resize(image, (new_width, new_height))
|
275 |
return Image.fromarray(image)
|
276 |
|
|
|
270 |
image = openpose_processor(image, hand_and_face=False, output_type='cv2')
|
271 |
height, width = image.shape[:2]
|
272 |
ratio = np.sqrt(1024. * 1024. / (width * height))
|
273 |
+
new_width, new_height = int(width * ratio), int(height * ratio)
|
274 |
image = cv2.resize(image, (new_width, new_height))
|
275 |
return Image.fromarray(image)
|
276 |
|