Update app.py
Browse files
app.py
CHANGED
|
@@ -77,7 +77,10 @@ def predict_peptide(sequence: str):
|
|
| 77 |
return []
|
| 78 |
|
| 79 |
X = extract_features_app(seq)
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
table = []
|
| 83 |
for i, target in enumerate(TARGET_CELLS):
|
|
@@ -85,6 +88,7 @@ def predict_peptide(sequence: str):
|
|
| 85 |
table.append([target, round(prob, 4)])
|
| 86 |
return table
|
| 87 |
|
|
|
|
| 88 |
# --- Gradio Interface ---
|
| 89 |
custom_css = """
|
| 90 |
footer, .footer {display:none !important;}
|
|
|
|
| 77 |
return []
|
| 78 |
|
| 79 |
X = extract_features_app(seq)
|
| 80 |
+
|
| 81 |
+
#probs_list = model.predict_proba(X) # list of arrays per target
|
| 82 |
+
# --- probs_list: list of arrays from each estimator ---
|
| 83 |
+
probs_list = [est.predict_proba(X) for est in model] # model is a list
|
| 84 |
|
| 85 |
table = []
|
| 86 |
for i, target in enumerate(TARGET_CELLS):
|
|
|
|
| 88 |
table.append([target, round(prob, 4)])
|
| 89 |
return table
|
| 90 |
|
| 91 |
+
|
| 92 |
# --- Gradio Interface ---
|
| 93 |
custom_css = """
|
| 94 |
footer, .footer {display:none !important;}
|