Download appTEST.py from DonImages/Testing2: direct link, hf CLI and curl.
- Browser
- Download file 433 Bytes
-
https://huggingface.co/spaces/DonImages/Testing2/resolve/main/appTEST.py
- Command line
-
hf download hf://spaces/DonImages/Testing2/appTEST.py
-
curl -L -o appTEST.py https://huggingface.co/spaces/DonImages/Testing2/resolve/main/appTEST.py
433 Bytes
| import torch | |
| import os | |
| lora_path = "lora_trained_model.pt" | |
| if os.path.exists(lora_path): | |
| try: | |
| state_dict = torch.load(lora_path, map_location="cpu") | |
| print("✅ LoRA checkpoint loaded successfully!") | |
| print("Keys in the checkpoint:", state_dict.keys()) # Print available keys | |
| except Exception as e: | |
| print(f"❌ Error loading LoRA checkpoint: {e}") | |
| else: | |
| print("❌ LoRA file not found.") |