Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 ที่มี
|