Commit History

Create app.py
7941d68
verified

Tejasf commited on

Update requirements.txt
58cc47f
verified

Tejasf commited on

Delete app.py
2879af1
verified

Tejasf commited on

Create app.py
af83f98
verified

Tejasf commited on

Delete app.py
bac629b
verified

Tejasf commited on

Create requirements.txt
339ca23
verified

Tejasf commited on

Create app.py
6e4d431
verified

Tejasf commited on

Delete app.py
0369c9f
verified

Tejasf commited on

Create app.py
c3eccc4
verified

Tejasf commited on

Delete app.py
0f1c713
verified

Tejasf commited on

Create app.py
4cf4037
verified

Tejasf commited on

Delete app.py import gradio as gr # Brain of the AI (Handling Text, Image, and 3D) def ai_process(text_input, image_input, chat_history): # History array ko initialize karna if chat_history is None: chat_history = [] user_text = text_input.lower() if text_input else "" # 1. IMAGE-TO-3D LOGIC if image_input is not None: chat_history.append(("Image uploaded", "Generating 3D model from your image... 🧊")) # Jab API connect hogi, toh yahan real 3D file (.glb) ka path aayega output_3d_file = "dummy_model.glb" return chat_history, output_3d_file # 2. TEXT-TO-3D LOGIC elif "3d" in user_text or "render" in user_text: chat_history.append((text_input, f"Generating 3D model for '{text_input}'... 🧊")) # Same yahan bhi 3D file aayegi output_3d_file = "dummy_model.glb" return chat_history, output_3d_file # 3. HARD CODING & NORMAL CHAT elif text_input: reply = f"Logic understood. Here is your code:\n\n```python\nprint('V.O.I.D System Online')\n```" chat_history.append((text_input, reply)) return chat_history, None return chat_history, None # Professional UI Design with gr.Blocks with gr.Blocks(theme=gr.themes.Soft()) as demo: gr.Markdown("# 🌌 V.O.I.D - Ultimate AI (Coding + 3D Generation)") with gr.Row(): # Left Side: Chat, Text Input, and Image Upload with gr.Column(scale=2): chatbot = gr.Chatbot(label="V.O.I.D Terminal", height=400) text_input = gr.Textbox(placeholder="Type your prompt here or ask for a 3D model...", label="Text Prompt") image_input = gr.Image(type="filepath", label="Upload Image for Image-to-3D (Optional)") submit_btn = gr.Button("Generate / Chat πŸš€", variant="primary") # Right Side: 3D Model Viewer with gr.Column(scale=1): model_viewer = gr.Model3D(label="3D Model Viewer (.glb, .obj, .gltf)", height=400) # Button click logic connection submit_btn.click( fn=ai_process, inputs=[text_input, image_input, chatbot], outputs=[chatbot, model_viewer] ) # Launch the Application demo.launch()
5799385
verified

Tejasf commited on

Create app.pyimport gradio as gr # Brain of the AI (Handling Text, Image, and 3D) def ai_process(text_input, image_input, chat_history): # History array ko initialize karna if chat_history is None: chat_history = [] user_text = text_input.lower() if text_input else "" # 1. IMAGE-TO-3D LOGIC if image_input is not None: chat_history.append(("Image uploaded", "Generating 3D model from your image... 🧊")) # Jab API connect hogi, toh yahan real 3D file (.glb) ka path aayega output_3d_file = "dummy_model.glb" return chat_history, output_3d_file # 2. TEXT-TO-3D LOGIC elif "3d" in user_text or "render" in user_text: chat_history.append((text_input, f"Generating 3D model for '{text_input}'... 🧊")) # Same yahan bhi 3D file aayegi output_3d_file = "dummy_model.glb" return chat_history, output_3d_file # 3. HARD CODING & NORMAL CHAT elif text_input: reply = f"Logic understood. Here is your code:\n\n```python\nprint('V.O.I.D System Online')\n```" chat_history.append((text_input, reply)) return chat_history, None return chat_history, None # Professional UI Design with gr.Blocks with gr.Blocks(theme=gr.themes.Soft()) as demo: gr.Markdown("# 🌌 V.O.I.D - Ultimate AI (Coding + 3D Generation)") with gr.Row(): # Left Side: Chat, Text Input, and Image Upload with gr.Column(scale=2): chatbot = gr.Chatbot(label="V.O.I.D Terminal", height=400) text_input = gr.Textbox(placeholder="Type your prompt here or ask for a 3D model...", label="Text Prompt") image_input = gr.Image(type="filepath", label="Upload Image for Image-to-3D (Optional)") submit_btn = gr.Button("Generate / Chat πŸš€", variant="primary") # Right Side: 3D Model Viewer with gr.Column(scale=1): model_viewer = gr.Model3D(label="3D Model Viewer (.glb, .obj, .gltf)", height=400) # Button click logic connection submit_btn.click( fn=ai_process, inputs=[text_input, image_input, chatbot], outputs=[chatbot, model_viewer] ) # Launch the Application demo.launch()
ea00d84
verified

Tejasf commited on

initial commit
a8cf24a
verified

Tejasf commited on