Spaces:
Sleeping
Sleeping
Open links to app in current iframe
Browse filesThe current links don't open in the same iframe, they open a new
non-working tab, this fixes that.
hexviz/config.py
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
URL = "https://aksell-hexviz.hf.space/"
|
hexviz/pages/1_🗺️Identify_Interesting_Heads.py
CHANGED
@@ -1,6 +1,7 @@
|
|
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_single_heatmap, plot_tiled_heatmap
|
6 |
from hexviz.view import (
|
@@ -105,11 +106,12 @@ with mid:
|
|
105 |
head = head_one - 1
|
106 |
with right:
|
107 |
st.markdown(
|
108 |
-
"""
|
109 |
|
110 |
|
111 |
-
###
|
112 |
-
"""
|
|
|
113 |
)
|
114 |
|
115 |
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
from hexviz.attention import clean_and_validate_sequence, get_attention, get_sequence
|
4 |
+
from hexviz.config import URL
|
5 |
from hexviz.models import Model, ModelType
|
6 |
from hexviz.plot import plot_single_heatmap, plot_tiled_heatmap
|
7 |
from hexviz.view import (
|
|
|
106 |
head = head_one - 1
|
107 |
with right:
|
108 |
st.markdown(
|
109 |
+
f"""
|
110 |
|
111 |
|
112 |
+
### <a href="{URL}Attention_Visualization">🧬View attention from head on structure</a>
|
113 |
+
""",
|
114 |
+
unsafe_allow_html=True,
|
115 |
)
|
116 |
|
117 |
|
hexviz/🧬Attention_Visualization.py
CHANGED
@@ -11,10 +11,13 @@ from hexviz.attention import (
|
|
11 |
)
|
12 |
from hexviz.models import Model, ModelType
|
13 |
from hexviz.view import menu_items, select_model, select_pdb, select_protein
|
|
|
|
|
14 |
|
15 |
st.set_page_config(layout="centered", menu_items=menu_items)
|
16 |
st.title("Attention Visualization on proteins")
|
17 |
|
|
|
18 |
for k, v in st.session_state.items():
|
19 |
st.session_state[k] = v
|
20 |
|
@@ -218,12 +221,15 @@ st.markdown(
|
|
218 |
st.table(df)
|
219 |
|
220 |
st.markdown(
|
221 |
-
"""
|
222 |
### Check out the other pages
|
223 |
-
|
|
|
224 |
This can help you pick what specific attention heads to look at for your protein.
|
225 |
|
226 |
-
|
|
|
|
|
227 |
)
|
228 |
|
229 |
"""
|
|
|
11 |
)
|
12 |
from hexviz.models import Model, ModelType
|
13 |
from hexviz.view import menu_items, select_model, select_pdb, select_protein
|
14 |
+
from hexviz.config import URL
|
15 |
+
|
16 |
|
17 |
st.set_page_config(layout="centered", menu_items=menu_items)
|
18 |
st.title("Attention Visualization on proteins")
|
19 |
|
20 |
+
|
21 |
for k, v in st.session_state.items():
|
22 |
st.session_state[k] = v
|
23 |
|
|
|
221 |
st.table(df)
|
222 |
|
223 |
st.markdown(
|
224 |
+
f"""
|
225 |
### Check out the other pages
|
226 |
+
<a href="{URL}Identify_Interesting_Heads" target="_self">🗺️Identify Interesting Heads</a> gives a
|
227 |
+
bird's eye view of attention patterns for a model.
|
228 |
This can help you pick what specific attention heads to look at for your protein.
|
229 |
|
230 |
+
<a href="{URL}Documentation" target="_self">📄Documentation</a> has information on protein
|
231 |
+
language models, attention analysis and hexviz.""",
|
232 |
+
unsafe_allow_html=True,
|
233 |
)
|
234 |
|
235 |
"""
|