Spaces:
Runtime error
Runtime error
Download scripts/make_example.py from katospiegel/fly-behavior: direct link, hf CLI and curl.
- Browser
- Download file 578 Bytes
-
https://huggingface.co/spaces/katospiegel/fly-behavior/resolve/main/scripts/make_example.py
- Command line
-
hf download hf://spaces/katospiegel/fly-behavior/scripts/make_example.py
-
curl -L -o make_example.py https://huggingface.co/spaces/katospiegel/fly-behavior/resolve/main/scripts/make_example.py
578 Bytes
| """Bake a synthetic fly-arena video into APP_TMP_DIR for the example + smoke test.""" | |
| from __future__ import annotations | |
| import sys | |
| import tifffile | |
| from core.io import APP_TMP_DIR, register_protected | |
| from core.synth import fly_arena | |
| def main() -> int: | |
| out = APP_TMP_DIR / "example.tif" | |
| frames, _, _, meta = fly_arena(T=300, H=256, W=256, n_flies=8, fps=15.0, seed=0) | |
| tifffile.imwrite(out, frames) | |
| register_protected(out) | |
| print(f"wrote {out} shape={frames.shape} flies={meta['n_flies']}") | |
| return 0 | |
| if __name__ == "__main__": | |
| sys.exit(main()) | |