Masrkai commited on
Commit
c2a06bc
·
verified ·
1 Parent(s): 377ce24

Create gr.Interface

Browse files
Files changed (1) hide show
  1. gr.Interface +15 -0
gr.Interface ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def gr_generate_3d(prompt):
4
+ file_path = generate_3d_model(prompt, output_path="assistant_3d.obj")
5
+ if file_path:
6
+ return file_path # Gradio automatically makes file downloadable
7
+ return "Error generating model."
8
+
9
+ gr.Interface(
10
+ fn=gr_generate_3d,
11
+ inputs="text",
12
+ outputs="file",
13
+ title="3D Model Generator",
14
+ description="Generate and download a 3D model based on a text prompt."
15
+ ).launch()