rayli commited on
Commit
d4abe97
·
verified ·
1 Parent(s): 7bc3bfa

Add step-by-step demo instructions

Browse files
Files changed (1) hide show
  1. app.py +59 -2
app.py CHANGED
@@ -162,6 +162,49 @@ DEMO_CSS = """
162
  --demo-warning-text: #fde68a;
163
  }
164
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  .demo-row {
166
  align-items: stretch !important;
167
  gap: 12px !important;
@@ -4803,8 +4846,22 @@ def create_gradio_app(app: InstructParticulateApp) -> gr.Blocks:
4803
  {DEMO_CSS}
4804
  {KINEMATIC_TREE_EDITOR_CSS}
4805
  </style>
4806
- <h1>Instruct Particulate</h1>
4807
- <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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4808
  """
4809
  )
4810
  mesh_face_warning = gr.HTML(
 
162
  --demo-warning-text: #fde68a;
163
  }
164
  }
165
+ .demo-intro {
166
+ max-width: 1120px;
167
+ margin: 0 0 18px;
168
+ color: var(--demo-text) !important;
169
+ }
170
+ .demo-intro h1 {
171
+ margin: 0 0 12px;
172
+ color: var(--demo-text) !important;
173
+ }
174
+ .demo-instructions {
175
+ color: var(--demo-text) !important;
176
+ }
177
+ .demo-instructions h3 {
178
+ margin: 0 0 8px;
179
+ color: var(--demo-text) !important;
180
+ font-size: 16px;
181
+ font-weight: 600;
182
+ line-height: 20.8px;
183
+ }
184
+ .demo-instructions p,
185
+ .demo-instructions li {
186
+ color: var(--demo-text) !important;
187
+ font-size: 16px;
188
+ line-height: 24px;
189
+ }
190
+ .demo-instructions p {
191
+ margin: 0 0 10px;
192
+ }
193
+ .demo-instructions ol {
194
+ margin: 0 0 10px 22px;
195
+ padding: 0;
196
+ }
197
+ .demo-instructions li {
198
+ margin: 0 0 4px;
199
+ }
200
+ .demo-instructions strong {
201
+ color: var(--demo-text) !important;
202
+ font-weight: 600;
203
+ }
204
+ .demo-instructions .demo-note {
205
+ color: var(--demo-muted) !important;
206
+ line-height: 26px;
207
+ }
208
  .demo-row {
209
  align-items: stretch !important;
210
  gap: 12px !important;
 
4846
  {DEMO_CSS}
4847
  {KINEMATIC_TREE_EDITOR_CSS}
4848
  </style>
4849
+ <div class="demo-intro">
4850
+ <h1>Instruct-Particulate</h1>
4851
+ <div class="demo-instructions">
4852
+ <p>Upload one object mesh and provide or extract a kinematic tree. The demo predicts part segmentation and joint parameters, then exports animated GLB and URDF assets.</p>
4853
+ <h3>How to use the demo:</h3>
4854
+ <ol>
4855
+ <li><strong>Upload a mesh:</strong> use the Input Mesh panel or select an example. For reliable runs, use a simplified mesh with fewer than 100,000 faces.</li>
4856
+ <li><strong>Choose the upright orientation:</strong> click the preview where the object is upright. This orientation is used for both auto-kinematic extraction and inference.</li>
4857
+ <li><strong>Define the kinematic tree:</strong> edit links and joints manually, or click Extract Kinematic Structure to infer a starting tree and point prompts.</li>
4858
+ <li><strong>Add optional point prompts:</strong> select a link in the Kinematic Tree Editor, then click the mesh in the Point Prompt Picker to mark a representative point for that link.</li>
4859
+ <li><strong>Run inference:</strong> keep Connected Component Postprocessing on when the mesh has clean connected components, then click Run Inference.</li>
4860
+ <li><strong>Review and export:</strong> inspect the point query visualization, articulated model, and predicted parts and axes, then export the URDF when the output is ready.</li>
4861
+ </ol>
4862
+ <p class="demo-note">Large meshes are rejected before rendering or point-prompt setup so the Space remains responsive.</p>
4863
+ </div>
4864
+ </div>
4865
  """
4866
  )
4867
  mesh_face_warning = gr.HTML(