Haoxin Chen commited on
Commit
4ee9945
1 Parent(s): 8fa6380

add duplicate

Browse files
Files changed (2) hide show
  1. app.py +3 -0
  2. demo_test.py +2 -2
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import os
2
  import sys
3
  import gradio as gr
 
4
  from videocrafter_test import Text2Video
5
  from videocontrol_test import VideoControl
6
  sys.path.insert(1, os.path.join(sys.path[0], 'lvdm'))
@@ -24,6 +25,8 @@ def videocrafter_demo(result_dir='./tmp/'):
24
  with gr.Blocks(analytics_enabled=False) as videocrafter_iface:
25
  gr.Markdown("<div align='center'> <h2> VideoCrafter: A Toolkit for Text-to-Video Generation and Editing </span> </h2> \
26
  <a style='font-size:18px;color: #000000' href='https://github.com/VideoCrafter/VideoCrafter'> Github </div>")
 
 
27
  #######t2v#######
28
  with gr.Tab(label="Text2Video"):
29
  with gr.Column():
 
1
  import os
2
  import sys
3
  import gradio as gr
4
+ # from demo_test import Text2Video, VideoControl
5
  from videocrafter_test import Text2Video
6
  from videocontrol_test import VideoControl
7
  sys.path.insert(1, os.path.join(sys.path[0], 'lvdm'))
 
25
  with gr.Blocks(analytics_enabled=False) as videocrafter_iface:
26
  gr.Markdown("<div align='center'> <h2> VideoCrafter: A Toolkit for Text-to-Video Generation and Editing </span> </h2> \
27
  <a style='font-size:18px;color: #000000' href='https://github.com/VideoCrafter/VideoCrafter'> Github </div>")
28
+
29
+ gr.Markdown("<b> You may duplicate the space and upgrade to GPU in settings for better performance and faster inference without waiting in the queue. <a style='display:inline-block' href='https://huggingface.co/spaces/VideoCrafter/VideoCrafter?duplicate=true'> <img src='https://bit.ly/3gLdBN6' alt='Duplicate Space'></a> </b>")
30
  #######t2v#######
31
  with gr.Tab(label="Text2Video"):
32
  with gr.Column():
demo_test.py CHANGED
@@ -7,10 +7,10 @@ class Text2Video():
7
  return '01.mp4'
8
 
9
  class VideoControl:
10
- def __init__(self) -> None:
11
  pass
12
 
13
- def get_video(self, input_video, input_prompt, frame_stride, vc_steps, vc_cfg_scale, vc_eta):
14
 
15
  return 'su','01.mp4'
16
 
 
7
  return '01.mp4'
8
 
9
  class VideoControl:
10
+ def __init__(self, result_dir='./tmp/') -> None:
11
  pass
12
 
13
+ def get_video(self, input_video, input_prompt, frame_stride=0, vc_steps=50, vc_cfg_scale=15.0, vc_eta=1.0, video_frames=16, resolution=256):
14
 
15
  return 'su','01.mp4'
16