Spaces:
Running
Running
Download scripts/setup_tabpfn.py from ThinkcatLab/LiveHouse-TS: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/spaces/ThinkcatLab/LiveHouse-TS/resolve/main/scripts/setup_tabpfn.py
- Command line
-
hf download hf://spaces/ThinkcatLab/LiveHouse-TS/scripts/setup_tabpfn.py
-
curl -L -o setup_tabpfn.py https://huggingface.co/spaces/ThinkcatLab/LiveHouse-TS/resolve/main/scripts/setup_tabpfn.py
858 Bytes
| #!/usr/bin/env python3 | |
| """Install the cloud TabPFN adapter without changing the Gradio environment.""" | |
| from pathlib import Path | |
| import os | |
| import subprocess | |
| import sys | |
| import venv | |
| ROOT = Path(__file__).resolve().parents[1] | |
| def main(): | |
| target = ROOT / ".venv-tabpfn" | |
| python = target / ("Scripts/python.exe" if os.name == "nt" else "bin/python") | |
| if not python.exists(): | |
| venv.create(target, with_pip=True) | |
| subprocess.run([str(python), "-m", "pip", "install", "--upgrade", "pip"], check=True) | |
| subprocess.run([str(python), "-m", "pip", "install", "-r", | |
| str(ROOT / "configs/tabpfn-requirements.txt")], check=True) | |
| subprocess.run([str(python), "-m", "pip", "check"], check=True) | |
| print(f"TabPFN ready: {python}. The adapter discovers this environment automatically.") | |
| if __name__ == "__main__": | |
| main() | |