rahul7star commited on
Commit
583dc73
·
verified ·
1 Parent(s): 9b7ce8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -67,7 +67,7 @@ def generate_t2v(prompt, size="1280*704", duration_seconds=5, steps=25, progress
67
  return dest_path, download_link, "Text-to-Video generated successfully!"
68
 
69
  @spaces.GPU(duration=get_duration)
70
- def generate_i2v(image, prompt, size="1280*704", duration_seconds=5, steps=25, progress=None):
71
  if image is None or not prompt.strip():
72
  return None, None, "Please upload an image and enter a prompt."
73
 
@@ -105,7 +105,7 @@ def generate_i2v(image, prompt, size="1280*704", duration_seconds=5, steps=25, p
105
 
106
  # ---------------- Step 4: Gradio UI ----------------
107
  with gr.Blocks() as demo:
108
- progress = gr.Progress(track_tqdm=True)
109
 
110
  gr.Markdown("## 🎥 Wan2.2-TI2V-5B Video Generator")
111
  gr.Markdown("Choose **Text-to-Video** or **Image-to-Video** mode below.")
@@ -124,7 +124,7 @@ with gr.Blocks() as demo:
124
  t2v_status = gr.Textbox(label="Status")
125
  t2v_btn.click(
126
  generate_t2v,
127
- [t2v_prompt, t2v_size, t2v_duration, t2v_steps, progress],
128
  [t2v_video, t2v_download, t2v_status]
129
  )
130
 
@@ -150,7 +150,7 @@ with gr.Blocks() as demo:
150
  i2v_status = gr.Textbox(label="Status")
151
  i2v_btn.click(
152
  generate_i2v,
153
- [i2v_image, i2v_prompt, i2v_size, i2v_duration, i2v_steps, progress],
154
  [i2v_video, i2v_download, i2v_status]
155
  )
156
 
 
67
  return dest_path, download_link, "Text-to-Video generated successfully!"
68
 
69
  @spaces.GPU(duration=get_duration)
70
+ def generate_i2v(image, prompt, size="1280*704", duration_seconds=5, steps=25, progress=gr.Progress(track_tqdm=True)):
71
  if image is None or not prompt.strip():
72
  return None, None, "Please upload an image and enter a prompt."
73
 
 
105
 
106
  # ---------------- Step 4: Gradio UI ----------------
107
  with gr.Blocks() as demo:
108
+
109
 
110
  gr.Markdown("## 🎥 Wan2.2-TI2V-5B Video Generator")
111
  gr.Markdown("Choose **Text-to-Video** or **Image-to-Video** mode below.")
 
124
  t2v_status = gr.Textbox(label="Status")
125
  t2v_btn.click(
126
  generate_t2v,
127
+ [t2v_prompt, t2v_size, t2v_duration, t2v_steps],
128
  [t2v_video, t2v_download, t2v_status]
129
  )
130
 
 
150
  i2v_status = gr.Textbox(label="Status")
151
  i2v_btn.click(
152
  generate_i2v,
153
+ [i2v_image, i2v_prompt, i2v_size, i2v_duration, i2v_steps],
154
  [i2v_video, i2v_download, i2v_status]
155
  )
156