File size: 446 Bytes
c2a06bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr

def gr_generate_3d(prompt):
    file_path = generate_3d_model(prompt, output_path="assistant_3d.obj")
    if file_path:
        return file_path  # Gradio automatically makes file downloadable
    return "Error generating model."

gr.Interface(
    fn=gr_generate_3d,
    inputs="text",
    outputs="file",
    title="3D Model Generator",
    description="Generate and download a 3D model based on a text prompt."
).launch()