Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -108,6 +108,20 @@ CONFORM_OUTPUT_TO_SOURCE_FPS = os.getenv("SCAIL_CONFORM_OUTPUT_TO_SOURCE_FPS", "
|
|
| 108 |
FPS_MATCH_EPSILON = float(os.getenv("SCAIL_FPS_MATCH_EPSILON", "0.05"))
|
| 109 |
AUTO_AVOID_SEGMENT_TRUNCATION = os.getenv("SCAIL_AUTO_AVOID_SEGMENT_TRUNCATION", "1") == "1"
|
| 110 |
MAX_AUTO_SEGMENT_LEN = int(os.getenv("SCAIL_MAX_AUTO_SEGMENT_LEN", "161"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
|
| 112 |
CLIP_CKPT_NAME = "models_clip_open-clip-xlm-roberta-large-vit-huge-14-onlyvisual.pth"
|
| 113 |
ORIGINAL_DIT_REL_PATH = "model/1/fsdp2_rank_0000_checkpoint.pt"
|
|
@@ -1666,7 +1680,7 @@ def build_ui():
|
|
| 1666 |
else (None, None, None, None, "", "animation", [], "No prepared examples found.")
|
| 1667 |
)
|
| 1668 |
|
| 1669 |
-
with gr.Blocks(title="SCAIL-2 Character Animation Demo") as demo:
|
| 1670 |
gr.Markdown(
|
| 1671 |
"# SCAIL-2 Character Animation Demo\n"
|
| 1672 |
"Try SCAIL-2 from curated examples or from already-prepared custom inputs. "
|
|
|
|
| 108 |
FPS_MATCH_EPSILON = float(os.getenv("SCAIL_FPS_MATCH_EPSILON", "0.05"))
|
| 109 |
AUTO_AVOID_SEGMENT_TRUNCATION = os.getenv("SCAIL_AUTO_AVOID_SEGMENT_TRUNCATION", "1") == "1"
|
| 110 |
MAX_AUTO_SEGMENT_LEN = int(os.getenv("SCAIL_MAX_AUTO_SEGMENT_LEN", "161"))
|
| 111 |
+
UI_MAX_WIDTH = os.getenv("SCAIL_UI_MAX_WIDTH", "1180px")
|
| 112 |
+
UI_CSS = f"""
|
| 113 |
+
.gradio-container {{
|
| 114 |
+
max-width: {UI_MAX_WIDTH} !important;
|
| 115 |
+
margin-left: auto !important;
|
| 116 |
+
margin-right: auto !important;
|
| 117 |
+
}}
|
| 118 |
+
|
| 119 |
+
@media (max-width: 900px) {{
|
| 120 |
+
.gradio-container {{
|
| 121 |
+
max-width: 100% !important;
|
| 122 |
+
}}
|
| 123 |
+
}}
|
| 124 |
+
"""
|
| 125 |
|
| 126 |
CLIP_CKPT_NAME = "models_clip_open-clip-xlm-roberta-large-vit-huge-14-onlyvisual.pth"
|
| 127 |
ORIGINAL_DIT_REL_PATH = "model/1/fsdp2_rank_0000_checkpoint.pt"
|
|
|
|
| 1680 |
else (None, None, None, None, "", "animation", [], "No prepared examples found.")
|
| 1681 |
)
|
| 1682 |
|
| 1683 |
+
with gr.Blocks(title="SCAIL-2 Character Animation Demo", css=UI_CSS) as demo:
|
| 1684 |
gr.Markdown(
|
| 1685 |
"# SCAIL-2 Character Animation Demo\n"
|
| 1686 |
"Try SCAIL-2 from curated examples or from already-prepared custom inputs. "
|