Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -272,13 +272,16 @@ def create_gradio_interface():
|
|
| 272 |
|
| 273 |
extract_glb_btn.click(
|
| 274 |
extract_glb,
|
| 275 |
-
inputs=[
|
| 276 |
outputs=[glb_output]
|
| 277 |
)
|
| 278 |
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
# Launch the interface
|
| 282 |
if __name__ == "__main__":
|
| 283 |
-
|
| 284 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|