Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -148,7 +148,12 @@ def run_triposg(image: Image.Image,
|
|
| 148 |
# Gradio Interface
|
| 149 |
def build_demo():
|
| 150 |
with gr.Blocks() as demo:
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
with gr.Row():
|
| 153 |
with gr.Column(scale=1):
|
| 154 |
input_image = gr.Image(type="pil", label="Input Image")
|
|
@@ -164,6 +169,26 @@ def build_demo():
|
|
| 164 |
with gr.Column(scale=1):
|
| 165 |
output_model = gr.Model3D(label="Merged 3D Object")
|
| 166 |
output_dir = gr.Textbox(label="Export Directory")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
|
| 168 |
run_button.click(fn=run_triposg,
|
| 169 |
inputs=[input_image, num_parts, seed, num_tokens, num_steps,
|
|
|
|
| 148 |
# Gradio Interface
|
| 149 |
def build_demo():
|
| 150 |
with gr.Blocks() as demo:
|
| 151 |
+
gr.Markdown(
|
| 152 |
+
""" # PartCrafter – Structured 3D Mesh Generation via Compositional Latent Diffusion Transformers
|
| 153 |
+
|
| 154 |
+
• Source: [Github](https://github.com/wgsxm/PartCrafter)
|
| 155 |
+
• HF Space by : [@alexandernasa](https://twitter.com/alexandernasa/) """
|
| 156 |
+
)
|
| 157 |
with gr.Row():
|
| 158 |
with gr.Column(scale=1):
|
| 159 |
input_image = gr.Image(type="pil", label="Input Image")
|
|
|
|
| 169 |
with gr.Column(scale=1):
|
| 170 |
output_model = gr.Model3D(label="Merged 3D Object")
|
| 171 |
output_dir = gr.Textbox(label="Export Directory")
|
| 172 |
+
examples = gr.Examples(
|
| 173 |
+
examples=[
|
| 174 |
+
[
|
| 175 |
+
"assets/images/np10_cc486e491a2c499f9fd2aad2b02c6ccb.png",
|
| 176 |
+
10,
|
| 177 |
+
123,
|
| 178 |
+
1024,
|
| 179 |
+
50,
|
| 180 |
+
7.0,
|
| 181 |
+
False,
|
| 182 |
+
True
|
| 183 |
+
],
|
| 184 |
+
|
| 185 |
+
],
|
| 186 |
+
inputs=[input_image, num_parts, seed, num_tokens, num_steps,
|
| 187 |
+
guidance, max_coords, flash_decoder, remove_bg],
|
| 188 |
+
outputs=[output_model, output_dir],
|
| 189 |
+
fn=run_triposg,
|
| 190 |
+
cache_examples=True,
|
| 191 |
+
)
|
| 192 |
|
| 193 |
run_button.click(fn=run_triposg,
|
| 194 |
inputs=[input_image, num_parts, seed, num_tokens, num_steps,
|