Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,9 @@ def predict(sequence):
|
|
68 |
"""Predict AMP vs Non-AMP"""
|
69 |
features = extract_features(sequence)
|
70 |
prediction = model.predict(features.T)[0]
|
71 |
-
|
|
|
|
|
72 |
|
73 |
# Create Gradio interface
|
74 |
iface = gr.Interface(
|
|
|
68 |
"""Predict AMP vs Non-AMP"""
|
69 |
features = extract_features(sequence)
|
70 |
prediction = model.predict(features.T)[0]
|
71 |
+
probabilities = model.predict_proba(features.T)
|
72 |
+
|
73 |
+
return "Potential Bioactive Peptide with Antimicrobial Properties (P-AMP)" if prediction == 0 else "Likely Non-Antimicrobial Peptide", probabilities[0]
|
74 |
|
75 |
# Create Gradio interface
|
76 |
iface = gr.Interface(
|