Update app.py
Browse files
app.py
CHANGED
@@ -110,25 +110,31 @@ def run_inference(prompt, image, pose_type, speed, use_flow_integration, cam_pos
|
|
110 |
# 3. Gradio App Interface
|
111 |
# =========================================
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
# 3. Gradio App Interface
|
111 |
# =========================================
|
112 |
|
113 |
+
demo = gr.Interface(
|
114 |
+
fn=run_inference,
|
115 |
+
inputs=[
|
116 |
+
gr.Textbox(label="Prompt", value="A girl riding a bicycle through a park."),
|
117 |
+
gr.Image(type="pil", label="Input Image"),
|
118 |
+
gr.Radio(choices=["manual", "re10k"], value="manual", label="Camera Pose Type"),
|
119 |
+
gr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=0.5, label="Camera Speed"),
|
120 |
+
gr.Checkbox(label="Use Flow Integration", value=False),
|
121 |
+
gr.Dropdown(
|
122 |
+
choices=["zoom_in", "zoom_out", "tilt_up", "tilt_down", "circle", ""],
|
123 |
+
label="Camera Trajectory",
|
124 |
+
value="zoom_in",
|
125 |
+
allow_custom_value=True
|
126 |
+
)
|
127 |
+
],
|
128 |
+
outputs=[
|
129 |
+
gr.Video(label="Generated Video"),
|
130 |
+
gr.Textbox(label="Logs", lines=20, interactive=False),
|
131 |
+
],
|
132 |
+
title="🎥 FloVD: Optical Flow + CogVideoX Video Generation",
|
133 |
+
description="Upload an image and prompt to generate motion-controlled video using FloVD and CogVideoX."
|
134 |
+
)
|
135 |
+
|
136 |
+
# -----------------------------
|
137 |
+
# Launch the App
|
138 |
+
# -----------------------------
|
139 |
+
if __name__ == "__main__":
|
140 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|