MySafeCode commited on
Commit
67edeb8
·
verified ·
1 Parent(s): 54cee86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -16
app.py CHANGED
@@ -1,5 +1,4 @@
1
- import faulthandler
2
- faulthandler.enable()
3
 
4
  import gradio as gr
5
  import cv2
@@ -252,21 +251,14 @@ def generate_voxel_files(
252
  return default_checkerboard()
253
 
254
  # -------------------------
255
- # GRADIO 6.0+ UI WITH BLOCKS - FIXED THEME ISSUE
256
  # -------------------------
257
  def create_interface():
258
- """Create Gradio 6.0+ compatible interface using Blocks"""
259
-
260
- # Remove theme parameter from gr.Blocks and handle it differently
261
- interface = gr.Blocks(
262
- title="MP4 → Voxels → 3D",
263
- css="""
264
- .gradio-container {max-width: 1200px !important; margin: auto !important;}
265
- .output-file {margin: 10px 0;}
266
- """
267
- )
268
 
269
- with interface:
 
 
270
  gr.Markdown("# 📹 MP4 → Voxels → 3D")
271
  gr.Markdown("Convert video files into voxelized 3D meshes. If no file is uploaded, a random-color checkerboard appears.")
272
 
@@ -327,8 +319,7 @@ def create_interface():
327
 
328
  model_3d = gr.Model3D(
329
  label="3D Preview",
330
- height=600,
331
- camera_position=[0, 0, 0]
332
  )
333
 
334
  status = gr.Textbox(
 
1
+
 
2
 
3
  import gradio as gr
4
  import cv2
 
251
  return default_checkerboard()
252
 
253
  # -------------------------
254
+ # GRADIO 6.0+ UI - MINIMAL VERSION
255
  # -------------------------
256
  def create_interface():
257
+ """Create minimal Gradio interface compatible with your version"""
 
 
 
 
 
 
 
 
 
258
 
259
+ # Use gr.Blocks without any styling parameters
260
+ with gr.Blocks(title="MP4 → Voxels → 3D") as interface:
261
+
262
  gr.Markdown("# 📹 MP4 → Voxels → 3D")
263
  gr.Markdown("Convert video files into voxelized 3D meshes. If no file is uploaded, a random-color checkerboard appears.")
264
 
 
319
 
320
  model_3d = gr.Model3D(
321
  label="3D Preview",
322
+ height=600
 
323
  )
324
 
325
  status = gr.Textbox(