Spaces:
Runtime error
Runtime error
dalexanderch
commited on
Commit
•
06b7537
1
Parent(s):
9208eed
Upload app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ from glycowork.glycan_data.loader import lib
|
|
12 |
def fn(class_list):
|
13 |
def f(glycan, model):
|
14 |
if model == "No data augmentation":
|
15 |
-
model = torch.load("model1.pt")
|
16 |
model.eval()
|
17 |
else:
|
18 |
-
model = torch.load("model2.pt")
|
19 |
model.eval()
|
20 |
glycan = [glycan]
|
21 |
label = [0]
|
|
|
12 |
def fn(class_list):
|
13 |
def f(glycan, model):
|
14 |
if model == "No data augmentation":
|
15 |
+
model = torch.load("model1.pt", map_location=torch.device('cpu'))
|
16 |
model.eval()
|
17 |
else:
|
18 |
+
model = torch.load("model2.pt", map_location=torch.device('cpu'))
|
19 |
model.eval()
|
20 |
glycan = [glycan]
|
21 |
label = [0]
|