Spaces:
Running
Running
File size: 858 Bytes
e317359 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/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()
|