Spaces:
Sleeping
Sleeping
Constrain generated rollout display size
Browse files538 unmodified lines53954054154254354433 unmodified lines57857958058158258358445 unmodified lines630631632633634635636538 unmodified linesreturn candidates[0] if candidates else None@spaces.GPU(duration=120)def run_inference(setting: str,33 unmodified linesreturn str(mp4), _tail(log + f"\nGenerated video: {mp4.relative_to(ROOT)}")with gr.Blocks(title="PhysFormer") as demo:gr.Markdown("""# PhysFormer Minimal ZeroGPU Demo45 unmodified linesheight=420,)run_button = gr.Button("Generate", variant="primary")video = gr.Video(label="Generated rollout", height=320, width=560)log = gr.Textbox(label="Log", lines=18)setting.change(538 unmodified lines53954054154254354454554654754854955055155255355455555655755833 unmodified lines59259359459559659759845 unmodified lines644645646647648649650538 unmodified linesreturn candidates[0] if candidates else NoneDEMO_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 linesreturn str(mp4), _tail(log + f"\nGenerated video: {mp4.relative_to(ROOT)}")with gr.Blocks(title="PhysFormer", css=DEMO_CSS) as demo:gr.Markdown("""# PhysFormer Minimal ZeroGPU Demo45 unmodified linesheight=420,)run_button = gr.Button("Generate", variant="primary")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