Spaces:
Running on Zero
Running on Zero
Claude Sonnet 4.5 Claude Fable 5 commited on
fix: gradio 6 API — api_name=False instead of removed show_api, theme via launch()
Browse files
app.py
CHANGED
|
@@ -219,7 +219,7 @@ def reconstruct_objects(image: np.ndarray, prompt: str = "object", progress=gr.P
|
|
| 219 |
return None, None, f"❌ Error:\n{tb[-1500:]}"
|
| 220 |
|
| 221 |
|
| 222 |
-
with gr.Blocks(title="SAM 3D Objects MCP"
|
| 223 |
gr.Markdown("""
|
| 224 |
# 📦 SAM 3D Objects
|
| 225 |
**Image (+ text prompt) → 3D Object (GLB)** · powered by Meta's SAM3 + SAM 3D Objects · usable as MCP server
|
|
@@ -243,7 +243,7 @@ with gr.Blocks(title="SAM 3D Objects MCP", theme=gr.themes.Ocean()) as demo:
|
|
| 243 |
btn.click(reconstruct_objects, inputs=[input_image, input_prompt],
|
| 244 |
outputs=[output_model, preview, status])
|
| 245 |
output_model.change(lambda x: x, inputs=[output_model], outputs=[output_file],
|
| 246 |
-
|
| 247 |
|
| 248 |
with gr.Tab("Guide"):
|
| 249 |
gr.Markdown("""
|
|
@@ -299,4 +299,4 @@ with gr.Blocks(title="SAM 3D Objects MCP", theme=gr.themes.Ocean()) as demo:
|
|
| 299 |
|
| 300 |
|
| 301 |
if __name__ == "__main__":
|
| 302 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 219 |
return None, None, f"❌ Error:\n{tb[-1500:]}"
|
| 220 |
|
| 221 |
|
| 222 |
+
with gr.Blocks(title="SAM 3D Objects MCP") as demo:
|
| 223 |
gr.Markdown("""
|
| 224 |
# 📦 SAM 3D Objects
|
| 225 |
**Image (+ text prompt) → 3D Object (GLB)** · powered by Meta's SAM3 + SAM 3D Objects · usable as MCP server
|
|
|
|
| 243 |
btn.click(reconstruct_objects, inputs=[input_image, input_prompt],
|
| 244 |
outputs=[output_model, preview, status])
|
| 245 |
output_model.change(lambda x: x, inputs=[output_model], outputs=[output_file],
|
| 246 |
+
api_name=False)
|
| 247 |
|
| 248 |
with gr.Tab("Guide"):
|
| 249 |
gr.Markdown("""
|
|
|
|
| 299 |
|
| 300 |
|
| 301 |
if __name__ == "__main__":
|
| 302 |
+
demo.launch(mcp_server=True, theme=gr.themes.Ocean())
|