Ahsen Khaliq commited on
Commit ·
e323e52
1
Parent(s): 363c085
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from PIL import Image
|
|
| 8 |
model = hub.Module(name='openpose_body_estimation')
|
| 9 |
def inference(image):
|
| 10 |
result = model.predict(image.name)
|
| 11 |
-
return Image.fromarray(np.uint8(result[
|
| 12 |
|
| 13 |
title = "OpenPose"
|
| 14 |
description = "Gradio demo for UGATIT-selfie2anime. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
|
|
|
| 8 |
model = hub.Module(name='openpose_body_estimation')
|
| 9 |
def inference(image):
|
| 10 |
result = model.predict(image.name)
|
| 11 |
+
return Image.fromarray(np.uint8(result['data'])[:,:,::-1]).convert('RGB')
|
| 12 |
|
| 13 |
title = "OpenPose"
|
| 14 |
description = "Gradio demo for UGATIT-selfie2anime. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|