app changes
Browse files
app.py
CHANGED
@@ -37,8 +37,7 @@ def make_bundle(image, name):
|
|
37 |
def predict(img: np.ndarray):
|
38 |
bundle = make_bundle(img, "Model3D")
|
39 |
dataset = EvalWMetaDataset(opts, [bundle])
|
40 |
-
|
41 |
-
return img, model, model
|
42 |
|
43 |
|
44 |
footer = r"""
|
@@ -59,10 +58,9 @@ with gr.Blocks(title="PIFuHD") as app:
|
|
59 |
with gr.Column():
|
60 |
output_obj = gr.Model3D(label="Output model")
|
61 |
output_img = gr.Image(type="filepath", label="Output image")
|
62 |
-
|
63 |
-
gr.ClearButton(components=[input_img, output_img, output_obj, output_file], variant="stop")
|
64 |
|
65 |
-
run_btn.click(predict, [input_img], [output_img, output_obj
|
66 |
|
67 |
with gr.Row():
|
68 |
blobs = [[f"examples/{x:02d}.png"] for x in range(1, 4)]
|
|
|
37 |
def predict(img: np.ndarray):
|
38 |
bundle = make_bundle(img, "Model3D")
|
39 |
dataset = EvalWMetaDataset(opts, [bundle])
|
40 |
+
return reconstructor.evaluate(dataset)
|
|
|
41 |
|
42 |
|
43 |
footer = r"""
|
|
|
58 |
with gr.Column():
|
59 |
output_obj = gr.Model3D(label="Output model")
|
60 |
output_img = gr.Image(type="filepath", label="Output image")
|
61 |
+
gr.ClearButton(components=[input_img, output_img, output_obj], variant="stop")
|
|
|
62 |
|
63 |
+
run_btn.click(predict, [input_img], [output_img, output_obj])
|
64 |
|
65 |
with gr.Row():
|
66 |
blobs = [[f"examples/{x:02d}.png"] for x in range(1, 4)]
|