Update app.py
Browse files
app.py
CHANGED
|
@@ -28,15 +28,6 @@ scheduler_dict = {
|
|
| 28 |
"LCM": LCMScheduler,
|
| 29 |
}
|
| 30 |
|
| 31 |
-
css = """
|
| 32 |
-
.toolbutton {
|
| 33 |
-
margin-buttom: 0em 0em 0em 0em;
|
| 34 |
-
max-width: 2.5em;
|
| 35 |
-
min-width: 2.5em !important;
|
| 36 |
-
height: 2.5em;
|
| 37 |
-
}
|
| 38 |
-
"""
|
| 39 |
-
|
| 40 |
SECRET_TOKEN = os.getenv('SECRET_TOKEN', 'default_secret')
|
| 41 |
|
| 42 |
class AnimateController:
|
|
@@ -253,20 +244,14 @@ controller.update_base_model("realistic2.safetensors")
|
|
| 253 |
|
| 254 |
|
| 255 |
def ui():
|
| 256 |
-
with gr.Blocks(
|
| 257 |
-
gr.
|
| 258 |
-
""
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
'''
|
| 265 |
-
Important Notes:
|
| 266 |
-
1. The generation speed is around few seconds. There is delay in the space.
|
| 267 |
-
2. Increase the sampling step and cfg and set proper negative prompt if you want more fancy videos.
|
| 268 |
-
'''
|
| 269 |
-
)
|
| 270 |
with gr.Column():
|
| 271 |
with gr.Row():
|
| 272 |
secret_token = gr.Text(label='Secret Token', max_lines=1)
|
|
@@ -309,12 +294,7 @@ def ui():
|
|
| 309 |
base_model_dropdown, lora_model_dropdown])
|
| 310 |
|
| 311 |
with gr.Column(variant="panel"):
|
| 312 |
-
|
| 313 |
-
"""
|
| 314 |
-
### 2. Configs for AnimateLCM.
|
| 315 |
-
"""
|
| 316 |
-
)
|
| 317 |
-
|
| 318 |
prompt_textbox = gr.Textbox(label="Prompt", lines=2, value="a boy holding a rabbit")
|
| 319 |
negative_prompt_textbox = gr.Textbox(
|
| 320 |
label="Negative prompt", lines=2, value="bad quality")
|
|
|
|
| 28 |
"LCM": LCMScheduler,
|
| 29 |
}
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
SECRET_TOKEN = os.getenv('SECRET_TOKEN', 'default_secret')
|
| 32 |
|
| 33 |
class AnimateController:
|
|
|
|
| 244 |
|
| 245 |
|
| 246 |
def ui():
|
| 247 |
+
with gr.Blocks() as demo:
|
| 248 |
+
gr.HTML("""
|
| 249 |
+
<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;">
|
| 250 |
+
<div style="text-align: center; color: black;">
|
| 251 |
+
<p style="color: black;">This space is a REST API to programmatically generate MP4 videos.</p>
|
| 252 |
+
<p style="color: black;">Interested in using it? Look no further than the <a href="https://huggingface.co/spaces/wangfuyun/AnimateLCM" target="_blank">original space</a>!</p>
|
| 253 |
+
</div>
|
| 254 |
+
</div>""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
with gr.Column():
|
| 256 |
with gr.Row():
|
| 257 |
secret_token = gr.Text(label='Secret Token', max_lines=1)
|
|
|
|
| 294 |
base_model_dropdown, lora_model_dropdown])
|
| 295 |
|
| 296 |
with gr.Column(variant="panel"):
|
| 297 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
prompt_textbox = gr.Textbox(label="Prompt", lines=2, value="a boy holding a rabbit")
|
| 299 |
negative_prompt_textbox = gr.Textbox(
|
| 300 |
label="Negative prompt", lines=2, value="bad quality")
|