Update app.py
Browse files
app.py
CHANGED
@@ -51,9 +51,13 @@ def Kmers_funct(seq,num):
|
|
51 |
def ACE(file):
|
52 |
test_seq = file
|
53 |
all = []
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
57 |
model = MyModel()
|
58 |
model.load_state_dict(torch.load("best_model.pth", map_location=torch.device('cpu')), strict=False)
|
59 |
model = model.to(device)
|
|
|
51 |
def ACE(file):
|
52 |
test_seq = file
|
53 |
all = []
|
54 |
+
seq_len = len(test_seq)
|
55 |
+
if seq_len <= 30:
|
56 |
+
for j in range(2, 11):
|
57 |
+
X = Kmers_funct([test_seq], j)
|
58 |
+
all.extend(X)
|
59 |
+
else:
|
60 |
+
all.append(test_seq)
|
61 |
model = MyModel()
|
62 |
model.load_state_dict(torch.load("best_model.pth", map_location=torch.device('cpu')), strict=False)
|
63 |
model = model.to(device)
|