Buckets:

download
raw
530 Bytes
# Install PyTorch and other dependencies
import subprocess
import sys
def install_package(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
try:
import torch
print("PyTorch already installed")
except ImportError:
print("Installing PyTorch...")
install_package("torch")
install_package("torchvision")
try:
import numpy
print("NumPy already installed")
except ImportError:
print("Installing NumPy...")
install_package("numpy")
print("All packages ready!")

Xet Storage Details

Size:
530 Bytes
·
Xet hash:
caf0eb44cd8cda91cdf6450d733adddd2ff05f8d43c9265a94dae0835713d559

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.