alexnasa commited on
Commit
3d8a7f0
·
verified ·
1 Parent(s): 1fec881

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -263,7 +263,23 @@ print("=" * 80)
263
  print("Pipeline fully loaded and ready!")
264
  print("=" * 80)
265
 
266
- @spaces.GPU(duration=80)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  def generate_video(
268
  input_image,
269
  prompt: str,
 
263
  print("Pipeline fully loaded and ready!")
264
  print("=" * 80)
265
 
266
+ def get_duration(
267
+ input_image,
268
+ prompt,
269
+ duration,
270
+ enhance_prompt,
271
+ seed,
272
+ randomize_seed,
273
+ height,
274
+ width,
275
+ progress)
276
+ ):
277
+ if duration <= 5:
278
+ return 80
279
+ else:
280
+ return 120
281
+
282
+ @spaces.GPU(duration=get_duration)
283
  def generate_video(
284
  input_image,
285
  prompt: str,