multimodalart HF Staff commited on
Commit
4f5e7b5
·
verified ·
1 Parent(s): 82fc0ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -8,8 +8,6 @@ import numpy as np
8
  import spaces
9
  from PIL import Image
10
 
11
- # --- 1. Initial Setup: Auto-Download Git Repo and Model Weights ---
12
-
13
  # Define paths
14
  REPO_PATH = "LongCat-Video"
15
  CHECKPOINT_DIR = os.path.join(REPO_PATH, "weights", "LongCat-Video")
@@ -128,7 +126,7 @@ def check_duration(
128
  use_refine,
129
  ):
130
  if use_refine:
131
- return 200
132
  else:
133
  return 900
134
 
@@ -236,11 +234,8 @@ def generate_video(
236
  # --- 4. Gradio UI Definition ---
237
 
238
  with gr.Blocks(css="style.css") as demo:
239
- gr.Markdown("# 🎬 LongCat-Video Demo")
240
- gr.Markdown(
241
- "A one-click Gradio interface for LongCat-Video. "
242
- "The first time you run this, it will automatically clone the official repository and download the model weights."
243
- )
244
 
245
  with gr.Tabs() as tabs:
246
  with gr.TabItem("Image-to-Video", id=1):
@@ -277,8 +272,6 @@ with gr.Blocks(css="style.css") as demo:
277
  t2v_button = gr.Button("Generate Video", variant="primary")
278
  with gr.Column(scale=3):
279
  video_output_t2v = gr.Video(label="Generated Video", interactive=False)
280
-
281
-
282
 
283
  # --- Event Handlers ---
284
  t2v_inputs = [
 
8
  import spaces
9
  from PIL import Image
10
 
 
 
11
  # Define paths
12
  REPO_PATH = "LongCat-Video"
13
  CHECKPOINT_DIR = os.path.join(REPO_PATH, "weights", "LongCat-Video")
 
126
  use_refine,
127
  ):
128
  if use_refine:
129
+ return 240
130
  else:
131
  return 900
132
 
 
234
  # --- 4. Gradio UI Definition ---
235
 
236
  with gr.Blocks(css="style.css") as demo:
237
+ gr.Markdown("# 🎬 LongCat-Video")
238
+ gr.Markdown('''[[Model](https://huggingface.co/meituan-longcat/LongCat-Video)]''')
 
 
 
239
 
240
  with gr.Tabs() as tabs:
241
  with gr.TabItem("Image-to-Video", id=1):
 
272
  t2v_button = gr.Button("Generate Video", variant="primary")
273
  with gr.Column(scale=3):
274
  video_output_t2v = gr.Video(label="Generated Video", interactive=False)
 
 
275
 
276
  # --- Event Handlers ---
277
  t2v_inputs = [