ninenox commited on
Commit
599e7a4
·
verified ·
1 Parent(s): c0f45b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,9 +7,9 @@ from torchvision import models
7
  import torch
8
 
9
  # โหลด model จากไฟล์ .pt
10
- model = torch.load('model_blood.pt')
11
- device = 'cpu' # torch.device('cuda' if torch.cuda.is_available() else 'cpu')
12
- model.to(device)
13
  model.eval()
14
 
15
  # ข้อความ string ค่าของ classes ที่มี
 
7
  import torch
8
 
9
  # โหลด model จากไฟล์ .pt
10
+ model = torch.load('model_blood.pt',map_location=torch.device('cpu'))
11
+ # device = 'cpu' # torch.device('cuda' if torch.cuda.is_available() else 'cpu')
12
+ # model.to(device)
13
  model.eval()
14
 
15
  # ข้อความ string ค่าของ classes ที่มี