kuldeep0204 commited on
Commit
7f645b0
·
verified ·
1 Parent(s): 1e43f57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -1,13 +1,9 @@
1
  import torch
2
 
3
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
4
-
5
  MODEL_PATH = "model/model.pt"
 
6
 
7
- # load full model (from your .pt file)
8
  print(f"Loading model from: {MODEL_PATH}")
9
  model = torch.load(MODEL_PATH, map_location=device, weights_only=False)
10
  model.to(device)
11
  model.eval()
12
-
13
- print("Model loaded successfully!")
 
1
  import torch
2
 
 
 
3
  MODEL_PATH = "model/model.pt"
4
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
5
 
 
6
  print(f"Loading model from: {MODEL_PATH}")
7
  model = torch.load(MODEL_PATH, map_location=device, weights_only=False)
8
  model.to(device)
9
  model.eval()