Update forge-3d from local forge-bricks (with vendored common)
Browse files
app.py
CHANGED
|
@@ -129,7 +129,7 @@ def generate_3d(
|
|
| 129 |
|
| 130 |
|
| 131 |
def build_ui():
|
| 132 |
-
with gr.Blocks(title="Forge-3D"
|
| 133 |
gr.Markdown("# 🧊 Forge-3D (image/text → 3D + previews + analysis hooks)\nRobust (health + adapters + local first). Pairs with forge-visuals for full bidir.")
|
| 134 |
with gr.Row():
|
| 135 |
img = gr.Image(label="Input image (or concept)", type="filepath")
|
|
@@ -146,6 +146,11 @@ def build_ui():
|
|
| 146 |
return demo
|
| 147 |
|
| 148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
if __name__ == "__main__":
|
| 150 |
health.start([TRIPOSG, HUNYUAN])
|
| 151 |
-
|
|
|
|
| 129 |
|
| 130 |
|
| 131 |
def build_ui():
|
| 132 |
+
with gr.Blocks(title="Forge-3D") as demo:
|
| 133 |
gr.Markdown("# 🧊 Forge-3D (image/text → 3D + previews + analysis hooks)\nRobust (health + adapters + local first). Pairs with forge-visuals for full bidir.")
|
| 134 |
with gr.Row():
|
| 135 |
img = gr.Image(label="Input image (or concept)", type="filepath")
|
|
|
|
| 146 |
return demo
|
| 147 |
|
| 148 |
|
| 149 |
+
# Build at module level so that `demo` (and `gradio_app`) exist when the module is imported
|
| 150 |
+
# (required for Hugging Face Spaces and for agent/MCP discovery).
|
| 151 |
+
demo = build_ui()
|
| 152 |
+
gradio_app = demo # alias for compatibility with tools/skills that expect `gradio_app`
|
| 153 |
+
|
| 154 |
if __name__ == "__main__":
|
| 155 |
health.start([TRIPOSG, HUNYUAN])
|
| 156 |
+
demo.launch(server_name="0.0.0.0", server_port=int(os.environ.get("PORT", 7861)), mcp_server=True)
|