chateauxai commited on
Commit
843444c
·
verified ·
1 Parent(s): 6e469c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -272,13 +272,16 @@ def create_gradio_interface():
272
 
273
  extract_glb_btn.click(
274
  extract_glb,
275
- inputs=[state, mesh_simplify, texture_size],
276
  outputs=[glb_output]
277
  )
278
 
279
- return demo
280
-
281
- # Launch the interface
282
  if __name__ == "__main__":
283
- interface = create_gradio_interface()
284
- interface.launch()
 
 
 
 
 
 
272
 
273
  extract_glb_btn.click(
274
  extract_glb,
275
+ inputs=[ mesh_simplify, texture_size],
276
  outputs=[glb_output]
277
  )
278
 
279
+ # Launch the Gradio app
 
 
280
  if __name__ == "__main__":
281
+ pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
282
+ pipeline.cuda()
283
+ try:
284
+ pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
285
+ except:
286
+ pass
287
+ demo.launch()