Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,19 +14,7 @@ from api import Pose2Pose
|
|
14 |
from PIL import Image
|
15 |
import canvas
|
16 |
p2p = Pose2Pose(pretrained=True)
|
17 |
-
|
18 |
-
async () => {
|
19 |
-
const url = "https://huggingface.co/datasets/mishig/gradio-components/raw/main/mannequinAll.js"
|
20 |
-
fetch(url)
|
21 |
-
.then(res => res.text())
|
22 |
-
.then(text => {
|
23 |
-
const script = document.createElement('script');
|
24 |
-
script.type = "module"
|
25 |
-
script.src = URL.createObjectURL(new Blob([text], { type: 'application/javascript' }));
|
26 |
-
document.head.appendChild(script);
|
27 |
-
});
|
28 |
-
}
|
29 |
-
"""
|
30 |
|
31 |
def infer(con_im,ref_im):
|
32 |
condition = Image.open(con_im)
|
@@ -41,7 +29,8 @@ with gr.Blocks() as app:
|
|
41 |
condition_im = gr.Image(label='Style Image', type='filepath')
|
42 |
reference_im = gr.Image(label='Pose Image', type='filepath')
|
43 |
btn=gr.Button()
|
|
|
|
|
44 |
output_im = gr.Image()
|
45 |
btn.click(infer,[condition_im,reference_im], output_im)
|
46 |
-
app.load(None,None,None,_js=load_js)
|
47 |
app.launch()
|
|
|
14 |
from PIL import Image
|
15 |
import canvas
|
16 |
p2p = Pose2Pose(pretrained=True)
|
17 |
+
gr.Interface("spaces/Omnibus/model-mover")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
def infer(con_im,ref_im):
|
20 |
condition = Image.open(con_im)
|
|
|
29 |
condition_im = gr.Image(label='Style Image', type='filepath')
|
30 |
reference_im = gr.Image(label='Pose Image', type='filepath')
|
31 |
btn=gr.Button()
|
32 |
+
gr.Interface("spaces/Omnibus/model-mover").load()
|
33 |
+
|
34 |
output_im = gr.Image()
|
35 |
btn.click(infer,[condition_im,reference_im], output_im)
|
|
|
36 |
app.launch()
|