jbilcke-hf HF Staff commited on
Commit
631a46f
·
verified ·
1 Parent(s): 34a5803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -17
app.py CHANGED
@@ -115,23 +115,16 @@ def infer(secret_token, image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, s
115
 
116
 
117
 
118
- css = """#input_img {max-width: 1024px !important} #output_vid {max-width: 1024px; max-height: 576px}"""
119
-
120
- with gr.Blocks(analytics_enabled=False, css=css) as dynamicrafter_iface:
121
- gr.Markdown("<div align='center'> <h1> DynamiCrafter: Animating Open-domain Images with Video Diffusion Priors </span> </h1> \
122
- <h2 style='font-weight: 450; font-size: 1rem; margin: 0rem'>\
123
- <a href='https://doubiiu.github.io/'>Jinbo Xing</a>, \
124
- <a href='https://menghanxia.github.io/'>Menghan Xia</a>, <a href='https://yzhang2016.github.io/'>Yong Zhang</a>, \
125
- <a href=''>Haoxin Chen</a>, <a href=''> Wangbo Yu</a>,\
126
- <a href='https://github.com/hyliu'>Hanyuan Liu</a>, <a href='https://xinntao.github.io/'>Xintao Wang</a>,\
127
- <a href='https://www.cse.cuhk.edu.hk/~ttwong/myself.html'>Tien-Tsin Wong</a>,\
128
- <a href='https://scholar.google.com/citations?user=4oXBp9UAAAAJ&hl=zh-CN'>Ying Shan</a>\
129
- </h2> \
130
- <a style='font-size:18px;color: #000000' href='https://arxiv.org/abs/2310.12190'> [ArXiv] </a>\
131
- <a style='font-size:18px;color: #000000' href='https://doubiiu.github.io/projects/DynamiCrafter/'> [Project Page] </a> \
132
- <a style='font-size:18px;color: #000000' href='https://github.com/Doubiiu/DynamiCrafter'> [Github] </a> </div>")
133
 
134
- with gr.Tab(label='ImageAnimation_576x1024'):
135
  with gr.Column():
136
  with gr.Row():
137
  secret_token = gr.Text(label='Secret Token', max_lines=1)
@@ -152,4 +145,4 @@ with gr.Blocks(analytics_enabled=False, css=css) as dynamicrafter_iface:
152
  fn = infer
153
  )
154
 
155
- dynamicrafter_iface.queue(max_size=12).launch(show_api=True)
 
115
 
116
 
117
 
118
+ with gr.Blocks() as app:
119
+ gr.HTML("""
120
+ <div style="z-index: 100; position: fixed; top: 0px; right: 0px; left: 0px; bottom: 0px; width: 100%; height: 100%; background: white; display: flex; align-items: center; justify-content: center; color: black;">
121
+ <div style="text-align: center; color: black;">
122
+ <p style="color: black;">This space is a REST API to programmatically generate MP4 videos.</p>
123
+ <p style="color: black;">Interested in using it? Look no further than the <a href="https://huggingface.co/spaces/multimodalart/stable-video-diffusion" target="_blank">original space</a>!</p>
124
+ </div>
125
+ </div>""")
 
 
 
 
 
 
 
126
 
127
+ with gr.Tab():
128
  with gr.Column():
129
  with gr.Row():
130
  secret_token = gr.Text(label='Secret Token', max_lines=1)
 
145
  fn = infer
146
  )
147
 
148
+ app.queue(max_size=12).launch(show_api=True)