File size: 602 Bytes
a57f2f6
15e998f
a57f2f6
15e998f
 
 
a57f2f6
15e998f
 
 
 
 
a57f2f6
15e998f
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()