from __future__ import annotations import gradio as gr from codec_core import run_benchmark def analyze(video): if not video: return "Upload a short video to begin.", [] return run_benchmark(video) with gr.Blocks(title="Simam Neural Codec Lab") as demo: gr.Markdown("# Simam Neural Codec Lab\nMeasure the trade-offs that matter for immersive video: quality, bitrate, latency, GPU cost, and decoder compatibility.") with gr.Row(): video = gr.Video(label="Short source clip") report = gr.Markdown("Upload a clip, then run the benchmark.") run = gr.Button("Run codec comparison", variant="primary") gr.Examples([["examples/sample_codec.mp4"]], inputs=[video], label="Try the included synthetic fixture") outputs = gr.Files(label="Generated comparison files") run.click(analyze, inputs=video, outputs=[report, outputs]) gr.Markdown("### Research boundary\nThis baseline uses host FFmpeg encoders. It is the control group for future learned-codec adapters; it does not claim neural compression superiority.") if __name__ == "__main__": demo.launch()