Spaces:
Runtime error
Runtime error
dalexanderch
commited on
Commit
•
cb13d0d
1
Parent(s):
4eeac2f
Upload app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,9 @@ def fn(class_list):
|
|
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()
|
@@ -48,6 +51,7 @@ demo = gr.Interface(
|
|
48 |
allow_flagging=False,
|
49 |
title="SweetNet demo",
|
50 |
examples=[["GlcOSN(a1-4)GlcA(b1-4)GlcOSN(a1-4)GlcAOS(b1-4)GlcOSN(a1-4)GlcOSN", "No data augmentation"],
|
51 |
-
["Man(a1-2)Man(a1-3)[Man(a1-3)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc", "Random node deletion"]
|
|
|
52 |
)
|
53 |
demo.launch(debug=True)
|
|
|
14 |
if model == "No data augmentation":
|
15 |
model = torch.load("model1.pt", map_location=torch.device('cpu'))
|
16 |
model.eval()
|
17 |
+
elif model == "Ensemble":
|
18 |
+
model = torch.load("model3.pt", map_location=torch.device('cpu'))
|
19 |
+
model.eval()
|
20 |
else:
|
21 |
model = torch.load("model2.pt", map_location=torch.device('cpu'))
|
22 |
model.eval()
|
|
|
51 |
allow_flagging=False,
|
52 |
title="SweetNet demo",
|
53 |
examples=[["GlcOSN(a1-4)GlcA(b1-4)GlcOSN(a1-4)GlcAOS(b1-4)GlcOSN(a1-4)GlcOSN", "No data augmentation"],
|
54 |
+
["Man(a1-2)Man(a1-3)[Man(a1-3)Man(a1-6)]Man(b1-4)GlcNAc(b1-4)GlcNAc", "Random node deletion"]
|
55 |
+
["Man(a1-2)Man(a1-3)[Man(a1-6)]Man(a1-6)[Man(a1-2)Man(a1-2)Man(a1-3)]Man(b1-4)GlcNAc", "Ensemble"]]
|
56 |
)
|
57 |
demo.launch(debug=True)
|