Spaces:
Sleeping
Sleeping
Also validate sequences in second view
Browse files
hexviz/pages/1_🗺️Identify_Interesting_Heads.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
from hexviz.attention import get_attention, get_sequence
|
4 |
from hexviz.models import Model, ModelType
|
5 |
from hexviz.plot import plot_tiled_heatmap
|
6 |
from hexviz.view import (
|
@@ -32,13 +32,13 @@ with st.expander(
|
|
32 |
pdb_id = select_pdb()
|
33 |
uploaded_file = st.file_uploader("2.Upload PDB", type=["pdb"])
|
34 |
input_sequence = st.text_area(
|
35 |
-
"3.Input sequence
|
36 |
-
"",
|
37 |
-
key="input_sequence",
|
38 |
-
max_chars=400,
|
39 |
)
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
42 |
|
43 |
selected_model = select_model(models)
|
44 |
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
from hexviz.attention import clean_and_validate_sequence, get_attention, get_sequence
|
4 |
from hexviz.models import Model, ModelType
|
5 |
from hexviz.plot import plot_tiled_heatmap
|
6 |
from hexviz.view import (
|
|
|
32 |
pdb_id = select_pdb()
|
33 |
uploaded_file = st.file_uploader("2.Upload PDB", type=["pdb"])
|
34 |
input_sequence = st.text_area(
|
35 |
+
"3.Input sequence", "", key="input_sequence", max_chars=400
|
|
|
|
|
|
|
36 |
)
|
37 |
+
sequence, error = clean_and_validate_sequence(input_sequence)
|
38 |
+
if error:
|
39 |
+
st.error(error)
|
40 |
+
pdb_str, structure, source = select_protein(pdb_id, uploaded_file, sequence)
|
41 |
+
st.write(f"Visualizing: {source}")
|
42 |
|
43 |
selected_model = select_model(models)
|
44 |
|