3d / app.py
KINGHAJI's picture
Update app.py
15e998f verified
raw
history blame contribute delete
602 Bytes
import gradio as gr
from inference import generate_3d_model # Replace with your actual function
def run_hunyuan(prompt=None, image=None):
result = generate_3d_model(prompt=prompt, image_path=image)
return result["model_3d_path"] # Should return .glb or .obj preview
gr.Interface(
fn=run_hunyuan,
inputs=[
gr.Textbox(label="Text Prompt"),
gr.Image(label="Or Upload Image")
],
outputs=gr.File(label="Download 3D Model"),
title="πŸŒ€ Hunyuan3D 2.1 Generator",
description="Generate 3D models from text or images using Tencent's Hunyuan3D-2.1"
).launch()