DonImages commited on
Commit
736177a
·
verified ·
1 Parent(s): f09410f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import torch
2
 
3
- # Check if CUDA (GPU) is available, otherwise use CPU
4
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
 
 
5
 
6
  # Load the checkpoint
7
- lora_path = "./lora_checkpoint.pt" # Path to the checkpoint file
8
  checkpoint = torch.load(lora_path, map_location=device)
9
 
10
- # Print the checkpoint keys to inspect the structure
11
  print("Checkpoint keys:", checkpoint.keys())
 
1
  import torch
2
 
3
+ # Specify the correct path to your LoRA checkpoint file
4
+ lora_path = "./lora_model.pt" # Replace with the correct file name
5
+
6
+ # Define the device (use CPU in this case)
7
+ device = torch.device("cpu")
8
 
9
  # Load the checkpoint
 
10
  checkpoint = torch.load(lora_path, map_location=device)
11
 
12
+ # Print the keys in the checkpoint to check the structure
13
  print("Checkpoint keys:", checkpoint.keys())