Abdulrahman1989 commited on
Commit
65ec2c8
·
1 Parent(s): 5318e63

Fix the code to only show image and video

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -35,20 +35,16 @@ class GradioApp:
35
  )
36
 
37
  def full_pipeline(self, prompt):
 
38
  initial_image = self.sdxl_generator.generate_images([prompt])[0]
39
- # controlled_image = self.controlnet_processor.controlnet_image(initial_image)
40
- mesh_data, video_data = self.video_generator.generate_3d_video(initial_image)
41
-
42
- # Create temporary files to display mesh and video content
43
- with tempfile.NamedTemporaryFile(delete=False, suffix=".ply") as mesh_file:
44
- mesh_file.write(mesh_data)
45
- mesh_path = mesh_file.name
46
-
47
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as video_file:
48
  video_file.write(video_data)
49
  video_path = video_file.name
50
 
51
- return initial_image, mesh_path, video_path
52
 
53
  def launch(self):
54
  interface = gr.Interface(
@@ -56,7 +52,6 @@ class GradioApp:
56
  inputs=gr.Textbox(label="Input Prompt"),
57
  outputs=[
58
  gr.Image(label="Generated Image"),
59
- gr.File(label="3D Mesh (.ply)"),
60
  gr.Video(label="3D Model Video")
61
  ],
62
  title="SDXL to ControlNet to 3D Pipeline",
 
35
  )
36
 
37
  def full_pipeline(self, prompt):
38
+
39
  initial_image = self.sdxl_generator.generate_images([prompt])[0]
40
+
41
+ video_data = self.video_generator.generate_3d_video(initial_image)
42
+
 
 
 
 
 
43
  with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4") as video_file:
44
  video_file.write(video_data)
45
  video_path = video_file.name
46
 
47
+ return initial_image, video_path
48
 
49
  def launch(self):
50
  interface = gr.Interface(
 
52
  inputs=gr.Textbox(label="Input Prompt"),
53
  outputs=[
54
  gr.Image(label="Generated Image"),
 
55
  gr.Video(label="3D Model Video")
56
  ],
57
  title="SDXL to ControlNet to 3D Pipeline",