Update app.py
Browse files
app.py
CHANGED
|
@@ -69,12 +69,6 @@ st.markdown(
|
|
| 69 |
)
|
| 70 |
|
| 71 |
fasta_input = st.text_area("Insere a sequΓͺncia FASTA:", height=200)
|
| 72 |
-
selected_model = st.selectbox("Modelo a utilizar:", [
|
| 73 |
-
"ProtBERT (MLP)",
|
| 74 |
-
"ProtBERT-BFD (MLP)",
|
| 75 |
-
"ESM-2 (MLP)",
|
| 76 |
-
"Ensemble (Stacking)"
|
| 77 |
-
])
|
| 78 |
predict_clicked = st.button("Prever GO terms")
|
| 79 |
|
| 80 |
if predict_clicked:
|
|
@@ -107,7 +101,7 @@ if predict_clicked:
|
|
| 107 |
|
| 108 |
# βββ 4) RESULTADOS βββ
|
| 109 |
def mostrar(tag, y_pred):
|
| 110 |
-
with st.expander(tag, expanded=
|
| 111 |
hits = mlb.inverse_transform((y_pred >= THRESH).astype(int))[0]
|
| 112 |
st.markdown(f"**GO terms com prob β₯ {THRESH}**")
|
| 113 |
if hits:
|
|
@@ -124,13 +118,9 @@ if predict_clicked:
|
|
| 124 |
name, _ = GO_INFO.get(go_id, ("", ""))
|
| 125 |
st.write(f"{go_id} β {name} : {y_pred[0][idx]:.4f}")
|
| 126 |
|
| 127 |
-
# βββ
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
mostrar("ESM-2 (MLP)", y_esm)
|
| 134 |
-
else:
|
| 135 |
-
mostrar("Ensemble (Stacking)", y_ens)
|
| 136 |
-
|
|
|
|
| 69 |
)
|
| 70 |
|
| 71 |
fasta_input = st.text_area("Insere a sequΓͺncia FASTA:", height=200)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
predict_clicked = st.button("Prever GO terms")
|
| 73 |
|
| 74 |
if predict_clicked:
|
|
|
|
| 101 |
|
| 102 |
# βββ 4) RESULTADOS βββ
|
| 103 |
def mostrar(tag, y_pred):
|
| 104 |
+
with st.expander(tag, expanded=(tag == "Ensemble (Stacking)")):
|
| 105 |
hits = mlb.inverse_transform((y_pred >= THRESH).astype(int))[0]
|
| 106 |
st.markdown(f"**GO terms com prob β₯ {THRESH}**")
|
| 107 |
if hits:
|
|
|
|
| 118 |
name, _ = GO_INFO.get(go_id, ("", ""))
|
| 119 |
st.write(f"{go_id} β {name} : {y_pred[0][idx]:.4f}")
|
| 120 |
|
| 121 |
+
# βββ MOSTRAR APENAS O ENSEMBLE POR DEFEITO βββ
|
| 122 |
+
|
| 123 |
+
# mostrar("ProtBERT (MLP)", y_pb)
|
| 124 |
+
# mostrar("ProtBERT-BFD (MLP)", y_bfd)
|
| 125 |
+
# mostrar("ESM-2 (MLP)", y_esm)
|
| 126 |
+
mostrar("Ensemble (Stacking)", y_ens)
|
|
|
|
|
|
|
|
|
|
|
|