Spaces:
Running
Running
minor fix
Browse files
launch.py
CHANGED
@@ -116,7 +116,7 @@ def preprocess_imgs(tmp_dir, input_img):
|
|
116 |
|
117 |
|
118 |
def ply_to_glb(ply_path):
|
119 |
-
script_path = "
|
120 |
result = subprocess.run(
|
121 |
["python", script_path, "--", ply_path],
|
122 |
capture_output=True,
|
@@ -132,11 +132,9 @@ def ply_to_glb(ply_path):
|
|
132 |
|
133 |
def mesh_gen(tmp_dir, use_seg):
|
134 |
os.system(
|
135 |
-
|
136 |
-
)
|
137 |
-
os.system(
|
138 |
-
f"curl -L -F tmp_dir={tmp_dir} {MESH_URL}/mv_to_mesh -o {tmp_dir}/mesh.ply"
|
139 |
)
|
|
|
140 |
|
141 |
mesh = trimesh.load_mesh(f"{tmp_dir}/mesh.ply")
|
142 |
vertex_normals = mesh.vertex_normals
|
@@ -210,6 +208,7 @@ with gr.Blocks(title=_TITLE, css="style.css", theme=custom_theme) as demo:
|
|
210 |
rows=[2],
|
211 |
object_fit="contain",
|
212 |
height=400,
|
|
|
213 |
)
|
214 |
input_image = gr.Image(
|
215 |
type="pil",
|
@@ -224,6 +223,7 @@ with gr.Blocks(title=_TITLE, css="style.css", theme=custom_theme) as demo:
|
|
224 |
object_fit="contain",
|
225 |
height=400,
|
226 |
interactive=False,
|
|
|
227 |
)
|
228 |
with gr.Row():
|
229 |
with gr.Column(scale=5):
|
|
|
116 |
|
117 |
|
118 |
def ply_to_glb(ply_path):
|
119 |
+
script_path = f"{code_dir}/ply2glb.py"
|
120 |
result = subprocess.run(
|
121 |
["python", script_path, "--", ply_path],
|
122 |
capture_output=True,
|
|
|
132 |
|
133 |
def mesh_gen(tmp_dir, use_seg):
|
134 |
os.system(
|
135 |
+
UNPOSED_CALL.replace("{tmp_dir}", tmp_dir).replace("{use_seg}", str(use_seg))
|
|
|
|
|
|
|
136 |
)
|
137 |
+
os.system(MESH_CALL.replace("{tmp_dir}", tmp_dir))
|
138 |
|
139 |
mesh = trimesh.load_mesh(f"{tmp_dir}/mesh.ply")
|
140 |
vertex_normals = mesh.vertex_normals
|
|
|
208 |
rows=[2],
|
209 |
object_fit="contain",
|
210 |
height=400,
|
211 |
+
show_share_button=False,
|
212 |
)
|
213 |
input_image = gr.Image(
|
214 |
type="pil",
|
|
|
223 |
object_fit="contain",
|
224 |
height=400,
|
225 |
interactive=False,
|
226 |
+
show_share_button=False,
|
227 |
)
|
228 |
with gr.Row():
|
229 |
with gr.Column(scale=5):
|