Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -44,6 +44,10 @@ CHECKPOINT = "single_step.ckpt"
|
|
| 44 |
TEXT_CONDITIONS = "text_conditions.pt"
|
| 45 |
CODEC_DIR = APP_ROOT / "codec"
|
| 46 |
EXAMPLES_DIR = APP_ROOT / "examples"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
SEGMENT_SIZE = 5 # the checkpoint is trained on 5-frame segments
|
| 48 |
DEFAULT_MAX_FRAMES = 10
|
| 49 |
MAX_MAX_FRAMES = 15
|
|
@@ -299,8 +303,7 @@ CSS = """
|
|
| 299 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 300 |
"""
|
| 301 |
|
| 302 |
-
with gr.Blocks(title="DiffCVE — Compressed Video Enhancement"
|
| 303 |
-
theme=gr.themes.Citrus(), css=CSS) as demo:
|
| 304 |
gr.Markdown(
|
| 305 |
"""
|
| 306 |
# 🎬 DiffCVE: Diffusion-based Compressed Video Enhancement
|
|
@@ -356,4 +359,4 @@ with gr.Blocks(title="DiffCVE — Compressed Video Enhancement",
|
|
| 356 |
api_name="enhance",
|
| 357 |
)
|
| 358 |
|
| 359 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 44 |
TEXT_CONDITIONS = "text_conditions.pt"
|
| 45 |
CODEC_DIR = APP_ROOT / "codec"
|
| 46 |
EXAMPLES_DIR = APP_ROOT / "examples"
|
| 47 |
+
# The Hub's git upload does not preserve the executable bit, so re-assert it
|
| 48 |
+
# for the bundled JM codec binaries (idempotent).
|
| 49 |
+
for _binary in (CODEC_DIR / "encoder", CODEC_DIR / "decoder"):
|
| 50 |
+
_binary.chmod(0o755)
|
| 51 |
SEGMENT_SIZE = 5 # the checkpoint is trained on 5-frame segments
|
| 52 |
DEFAULT_MAX_FRAMES = 10
|
| 53 |
MAX_MAX_FRAMES = 15
|
|
|
|
| 303 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 304 |
"""
|
| 305 |
|
| 306 |
+
with gr.Blocks(title="DiffCVE — Compressed Video Enhancement") as demo:
|
|
|
|
| 307 |
gr.Markdown(
|
| 308 |
"""
|
| 309 |
# 🎬 DiffCVE: Diffusion-based Compressed Video Enhancement
|
|
|
|
| 359 |
api_name="enhance",
|
| 360 |
)
|
| 361 |
|
| 362 |
+
demo.launch(mcp_server=True, theme=gr.themes.Citrus(), css=CSS)
|