Doubiiu commited on
Commit
fb3c58e
·
verified ·
1 Parent(s): f10dbcb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -92,12 +92,12 @@ def trajcrafter_demo(opts):
92
  }
93
  """
94
  image2video = TrajCrafter(opts,gradio=True)
95
- image2video.run_gradio = spaces.GPU(image2video.run_gradio, duration=10) # fixme
96
  with gr.Blocks(analytics_enabled=False, css=css) as trajcrafter_iface:
97
  # gr.Markdown("""
98
  # <div align='center'>
99
  # <h1>TrajectoryCrafter: Redirecting View Trajectory for Monocular Videos via Diffusion Models</h1>
100
- # <a style='font-size:18px;color: #FF5DB0' href='https://github.com/TrajectoryCrafter/TrajectoryCrafter'>[Github]</a>
101
  # <a style='font-size:18px;color: #000000' href='https://arxiv.org/abs/2409.02048'>[ArXiv]</a>
102
  # <a style='font-size:18px;color: #000000' href='https://trajectorycrafter.github.io/'>[Project Page]</a>
103
  # <a style='font-size:18px;color: #000000' href='https://www.youtube.com/watch?v=dQtHFgyrids'>[Video]</a>
@@ -293,11 +293,23 @@ def trajcrafter_demo(opts):
293
  gr.Examples(examples=examples,
294
  # inputs=[i2v_input_video,i2v_stride],
295
  inputs=[i2v_input_video, i2v_stride, i2v_center_scale, i2v_pose, i2v_steps, i2v_seed],
296
- outputs=[i2v_output_video],
297
- fn = image2video.run_gradio,
298
- cache_examples="lazy",
299
  )
300
 
 
 
 
 
 
 
 
 
 
 
 
 
301
  return trajcrafter_iface
302
 
303
 
 
92
  }
93
  """
94
  image2video = TrajCrafter(opts,gradio=True)
95
+ image2video.run_gradio = spaces.GPU(image2video.run_gradio, duration=290) # fixme
96
  with gr.Blocks(analytics_enabled=False, css=css) as trajcrafter_iface:
97
  # gr.Markdown("""
98
  # <div align='center'>
99
  # <h1>TrajectoryCrafter: Redirecting View Trajectory for Monocular Videos via Diffusion Models</h1>
100
+ # <a style='font-size:18px;color: #E7CCCC' href='https://github.com/TrajectoryCrafter/TrajectoryCrafter'>[Github]</a>
101
  # <a style='font-size:18px;color: #000000' href='https://arxiv.org/abs/2409.02048'>[ArXiv]</a>
102
  # <a style='font-size:18px;color: #000000' href='https://trajectorycrafter.github.io/'>[Project Page]</a>
103
  # <a style='font-size:18px;color: #000000' href='https://www.youtube.com/watch?v=dQtHFgyrids'>[Video]</a>
 
293
  gr.Examples(examples=examples,
294
  # inputs=[i2v_input_video,i2v_stride],
295
  inputs=[i2v_input_video, i2v_stride, i2v_center_scale, i2v_pose, i2v_steps, i2v_seed],
296
+ # outputs=[i2v_output_video],
297
+ # fn = image2video.run_gradio,
298
+ # cache_examples="lazy",
299
  )
300
 
301
+ gr.Markdown(
302
+ """
303
+ <span style='font-size:18px;color: #E7CCCC'>Note:
304
+ For time quota consideration, we set the default parameters to be more efficient here,
305
+ with a trade-off of shorter video length and slightly lower quality.
306
+ You may adjust the parameters according to our
307
+ <a style='font-size:18px;color: #FF5DB0' href='https://github.com/TrajectoryCrafter/TrajectoryCrafter'>[Github Repo]</a>
308
+ for better results if you have enough time quota.
309
+ </span>
310
+ """
311
+ )
312
+
313
  return trajcrafter_iface
314
 
315