rayli commited on
Commit
ec5608f
·
verified ·
1 Parent(s): 937e531

Render high face count warning as HTML

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3548,10 +3548,10 @@ def _mesh_face_warning_update(mesh: Any):
3548
  return gr.update(value="", visible=False)
3549
  return gr.update(
3550
  value=(
3551
- f"**Large mesh warning:** this mesh has {face_count:,} faces. "
3552
  "Very dense meshes can exhaust the Space's CPU resources during "
3553
  "post-processing; for reliable runs, use a mesh with fewer than "
3554
- f"{HIGH_FACE_COUNT_WARNING_THRESHOLD:,} faces."
3555
  ),
3556
  visible=True,
3557
  )
@@ -4736,7 +4736,7 @@ def create_gradio_app(app: InstructParticulateApp) -> gr.Blocks:
4736
  <p>Upload one object mesh and provide a kinematic tree. The demo predicts part segmentation and joint parameters, then exports animated GLB and URDF assets.</p>
4737
  """
4738
  )
4739
- mesh_face_warning = gr.Markdown(
4740
  value="",
4741
  visible=False,
4742
  elem_classes=["mesh-face-warning"],
 
3548
  return gr.update(value="", visible=False)
3549
  return gr.update(
3550
  value=(
3551
+ f"<p><strong>Large mesh warning:</strong> this mesh has {face_count:,} faces. "
3552
  "Very dense meshes can exhaust the Space's CPU resources during "
3553
  "post-processing; for reliable runs, use a mesh with fewer than "
3554
+ f"{HIGH_FACE_COUNT_WARNING_THRESHOLD:,} faces.</p>"
3555
  ),
3556
  visible=True,
3557
  )
 
4736
  <p>Upload one object mesh and provide a kinematic tree. The demo predicts part segmentation and joint parameters, then exports animated GLB and URDF assets.</p>
4737
  """
4738
  )
4739
+ mesh_face_warning = gr.HTML(
4740
  value="",
4741
  visible=False,
4742
  elem_classes=["mesh-face-warning"],