Spaces:
Sleeping
Sleeping
Constrain generated rollout display size
Browse files538 unmodified lines53954054154254354454554654754854955055155255355455555655755833 unmodified lines59259359458159559659759845 unmodified lines644645646633647648649650538 unmodified lines return candidates[0] if candidates else None
DEMO_CSS = """#generated-rollout { width: min(100%, 420px) !important; max-width: 420px !important;}
#generated-rollout video { width: 100% !important; max-height: 240px !important; object-fit: contain !important;}"""
@spaces.GPU(duration=120)def run_inference( setting: str,33 unmodified lines return str(mp4), _tail(log + f"\nGenerated video: {mp4.relative_to(ROOT)}")
with gr.Blocks(title="PhysFormer") as demo:with gr.Blocks(title="PhysFormer", css=DEMO_CSS) as demo: gr.Markdown( """ # PhysFormer Minimal ZeroGPU Demo45 unmodified lines height=420, ) run_button = gr.Button("Generate", variant="primary") video = gr.Video(label="Generated rollout", height=320, width=560) video = gr.Video(label="Generated rollout", height=240, width=420, elem_id="generated-rollout") log = gr.Textbox(label="Log", lines=18)
setting.change(app.py+16-2