Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ scaler = MinMaxScaler()
|
|
11 |
def extract_features(sequence):
|
12 |
"""Calculate AAC, Dipeptide Composition, and normalize features."""
|
13 |
# Calculate Amino Acid Composition (AAC) and convert to array
|
14 |
-
aac = np.array(list(AAComposition
|
15 |
|
16 |
# Normalize using the pre-trained scaler (Ensure the scaler is loaded correctly)
|
17 |
normalized_features = scaler.transform([aac]) # Don't use fit_transform(), only transform()
|
|
|
11 |
def extract_features(sequence):
|
12 |
"""Calculate AAC, Dipeptide Composition, and normalize features."""
|
13 |
# Calculate Amino Acid Composition (AAC) and convert to array
|
14 |
+
aac = np.array(list(AAComposition.CalculateAADipeptideComposition(sequence)))
|
15 |
|
16 |
# Normalize using the pre-trained scaler (Ensure the scaler is loaded correctly)
|
17 |
normalized_features = scaler.transform([aac]) # Don't use fit_transform(), only transform()
|