roll-ai commited on
Commit
b0da608
·
verified ·
1 Parent(s): 2dd8067

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -21
app.py CHANGED
@@ -119,28 +119,27 @@ def run_inference(prompt, image, pose_type, speed, use_flow_integration, cam_pos
119
  # =========================================
120
  # 3. Define FloVD Gradio Interface
121
  # =========================================
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
- video_interface = gr.Interface(
124
- fn=run_inference,
125
- inputs=[
126
- gr.Textbox(label="Prompt", value="A girl riding a bicycle through a park."),
127
- gr.Image(label="Input Image"),
128
- gr.Radio(choices=["manual", "re10k"], value="manual", label="Camera Pose Type"),
129
- gr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=0.5, label="Camera Speed"),
130
- gr.Checkbox(label="Use Flow Integration", value=False),
131
- gr.Textbox(
132
- label="Camera Trajectory",
133
- placeholder="e.g., zoom_in, custom_motion, etc.",
134
- lines=1
135
- )
136
- ],
137
- outputs=[
138
- gr.Video(label="Generated Video"),
139
- gr.Textbox(label="Logs", lines=20, interactive=False),
140
- ],
141
- title="🎥 FloVD: Optical Flow + CogVideoX Video Generation",
142
- description="Upload an image and prompt to generate motion-controlled video using FloVD and CogVideoX."
143
- )
144
  # =========================================
145
  # 4. Live System Monitor (Fixed)
146
  # =========================================
 
119
  # =========================================
120
  # 3. Define FloVD Gradio Interface
121
  # =========================================
122
+ with gr.Blocks() as video_tab:
123
+ gr.Markdown("## 🎥 FloVD: Optical Flow + CogVideoX Video Generation")
124
+
125
+ prompt = gr.Textbox(label="Prompt", value="A girl riding a bicycle through a park.")
126
+ image = gr.Image(label="Input Image")
127
+ pose_type = gr.Radio(choices=["manual", "re10k"], value="manual", label="Camera Pose Type")
128
+ speed = gr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=0.5, label="Camera Speed")
129
+ use_flow_integration = gr.Checkbox(label="Use Flow Integration", value=False)
130
+ cam_pose_name = gr.Textbox(label="Camera Trajectory", placeholder="e.g., zoom_in, custom_motion, etc.", lines=1)
131
+
132
+ generate_btn = gr.Button("🎬 Generate Video")
133
+
134
+ video_output = gr.Video(label="Generated Video")
135
+ log_output = gr.Textbox(label="Logs", lines=20, interactive=False)
136
+
137
+ generate_btn.click(
138
+ fn=run_inference,
139
+ inputs=[prompt, image, pose_type, speed, use_flow_integration, cam_pose_name],
140
+ outputs=[video_output, log_output]
141
+ )
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  # =========================================
144
  # 4. Live System Monitor (Fixed)
145
  # =========================================