import torch def check_device(): if torch.cuda.is_available(): print("✅ GPU is available!") print(f"Using GPU: {torch.cuda.get_device_name(0)}") else: print("❌ GPU is not available.") print("Using CPU instead.") if __name__ == "__main__": check_device()