Ahsen Khaliq
commited on
Commit
•
363c085
1
Parent(s):
a4d2b90
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,14 @@ os.system("hub install openpose_body_estimation==1.0.0")
|
|
3 |
import gradio as gr
|
4 |
import paddlehub as hub
|
5 |
import numpy as np
|
|
|
6 |
|
7 |
model = hub.Module(name='openpose_body_estimation')
|
8 |
def inference(image):
|
9 |
result = model.predict(image.name)
|
10 |
return Image.fromarray(np.uint8(result[0])[:,:,::-1]).convert('RGB')
|
11 |
|
12 |
-
title = "
|
13 |
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."
|
14 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1907.10830' target='_blank'>U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation</a> | <a href='https://github.com/taki0112/UGATIT' target='_blank'>Github Repo</a></p>"
|
15 |
|
|
|
3 |
import gradio as gr
|
4 |
import paddlehub as hub
|
5 |
import numpy as np
|
6 |
+
from PIL import Image
|
7 |
|
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[0])[:,:,::-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."
|
15 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1907.10830' target='_blank'>U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation</a> | <a href='https://github.com/taki0112/UGATIT' target='_blank'>Github Repo</a></p>"
|
16 |
|