Abdulrahman1989 commited on
Commit
e43b248
·
1 Parent(s): 5f35729

fix the code

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -47,15 +47,16 @@ class GradioApp:
47
 
48
  def launch(self):
49
  with gr.Blocks() as interface:
50
- gr.Textbox(label="Input Prompt", elem_id="input_textbox")
 
51
  with gr.Row():
52
- gr.Column(scale=1, min_width=300) # Adjusts column width for the image
53
- gr.Image(label="Generated Image", elem_id="generated_image")
54
- gr.Column(scale=1, min_width=300) # Adjusts column width for the video
55
- gr.Video(label="3D Model Video", elem_id="model_video")
56
 
57
  interface.launch(share=True)
58
 
59
  if __name__ == "__main__":
60
  app = GradioApp()
61
- app.launch()
 
47
 
48
  def launch(self):
49
  with gr.Blocks() as interface:
50
+ prompt_input = gr.Textbox(label="Input Prompt", elem_id="input_textbox")
51
+ generate_button = gr.Button("Generate")
52
  with gr.Row():
53
+ image_output = gr.Image(label="Generated Image", elem_id="generated_image")
54
+ video_output = gr.Video(label="3D Model Video", elem_id="model_video")
55
+
56
+ generate_button.click(fn=self.full_pipeline, inputs=prompt_input, outputs=[image_output, video_output])
57
 
58
  interface.launch(share=True)
59
 
60
  if __name__ == "__main__":
61
  app = GradioApp()
62
+ app.launch()