Requirements
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def generate_3d(prompt):
|
| 4 |
+
# Simulate generation with a placeholder model
|
| 5 |
+
# Replace this later with actual model generation logic
|
| 6 |
+
return "sci_fi_sword.glb"
|
| 7 |
+
|
| 8 |
+
with gr.Blocks() as demo:
|
| 9 |
+
gr.Markdown("## 3D Model Generator (Text to 3D)")
|
| 10 |
+
prompt = gr.Textbox(label="Prompt", placeholder="e.g. A sci-fi sword")
|
| 11 |
+
output = gr.Model3D(label="Generated 3D Model", clear_color=[1.0, 1.0, 1.0, 1.0])
|
| 12 |
+
|
| 13 |
+
btn = gr.Button("Generate")
|
| 14 |
+
btn.click(fn=generate_3d, inputs=prompt, outputs=output)
|
| 15 |
+
|
| 16 |
+
demo.launch()
|