DonImages commited on
Commit
5555222
·
verified ·
1 Parent(s): b8feb0b

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+
3
+ lora_path = "lora_trained_model.pt"
4
+
5
+ if os.path.exists(lora_path):
6
+ try:
7
+ state_dict = torch.load(lora_path, map_location="cpu")
8
+ print("✅ LoRA checkpoint loaded successfully!")
9
+ print("Keys in the checkpoint:", state_dict.keys()) # Print available keys
10
+ except Exception as e:
11
+ print(f"❌ Error loading LoRA checkpoint: {e}")
12
+ else:
13
+ print("❌ LoRA file not found.")