aksell commited on
Commit
0f66182
1 Parent(s): 61d307b

Downgrade streamlit - 1.17

Browse files
Files changed (3) hide show
  1. hexviz/attention.py +2 -2
  2. poetry.lock +6 -6
  3. pyproject.toml +2 -2
hexviz/attention.py CHANGED
@@ -67,7 +67,7 @@ def get_tape_bert() -> Tuple[TAPETokenizer, ProteinBertModel]:
67
  model = ProteinBertModel.from_pretrained('bert-base', output_attentions=True)
68
  return tokenizer, model
69
 
70
- @st.cache_data
71
  def get_attention(
72
  sequence: List[str], model_type: ModelType = ModelType.TAPE_BERT
73
  ):
@@ -105,7 +105,7 @@ def unidirectional_sum_filtered(attention, layer, head, threshold):
105
  unidirectional_sum_for_head.append((sum, i, j))
106
  return unidirectional_sum_for_head
107
 
108
- @st.cache_data
109
  def get_attention_pairs(pdb_code: str, layer: int, head: int, threshold: int = 0.2, model_type: ModelType = ModelType.TAPE_BERT):
110
  # fetch structure
111
  structure = get_structure(pdb_code=pdb_code)
 
67
  model = ProteinBertModel.from_pretrained('bert-base', output_attentions=True)
68
  return tokenizer, model
69
 
70
+ @st.cache
71
  def get_attention(
72
  sequence: List[str], model_type: ModelType = ModelType.TAPE_BERT
73
  ):
 
105
  unidirectional_sum_for_head.append((sum, i, j))
106
  return unidirectional_sum_for_head
107
 
108
+ @st.cache
109
  def get_attention_pairs(pdb_code: str, layer: int, head: int, threshold: int = 0.2, model_type: ModelType = ModelType.TAPE_BERT):
110
  # fetch structure
111
  structure = get_structure(pdb_code=pdb_code)
poetry.lock CHANGED
@@ -1686,14 +1686,14 @@ streamlit = ">=0.63"
1686
 
1687
  [[package]]
1688
  name = "streamlit"
1689
- version = "1.20.0"
1690
  description = "The fastest way to build data apps in Python"
1691
  category = "main"
1692
  optional = false
1693
  python-versions = ">=3.7, !=3.9.7"
1694
 
1695
  [package.dependencies]
1696
- altair = ">=3.2.0,<5"
1697
  blinker = ">=1.0.0"
1698
  cachetools = ">=4.0"
1699
  click = ">=7.0"
@@ -1701,7 +1701,7 @@ gitpython = "!=3.1.19"
1701
  importlib-metadata = ">=1.4"
1702
  numpy = "*"
1703
  packaging = ">=14.1"
1704
- pandas = ">=0.25,<2"
1705
  pillow = ">=6.2.0"
1706
  protobuf = ">=3.12,<4"
1707
  pyarrow = ">=4.0"
@@ -1712,7 +1712,7 @@ requests = ">=2.4"
1712
  rich = ">=10.11.0"
1713
  semver = "*"
1714
  toml = "*"
1715
- tornado = ">=6.0.3"
1716
  typing-extensions = ">=3.10.0.0"
1717
  tzlocal = ">=1.1"
1718
  validators = ">=0.2"
@@ -2133,8 +2133,8 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-co
2133
 
2134
  [metadata]
2135
  lock-version = "1.1"
2136
- python-versions = "^3.8.9"
2137
- content-hash = "c4902982dd427349993b8019f7130f81583d025190b4bd2a2452166c7d146249"
2138
 
2139
  [metadata.files]
2140
  altair = []
 
1686
 
1687
  [[package]]
1688
  name = "streamlit"
1689
+ version = "1.17.0"
1690
  description = "The fastest way to build data apps in Python"
1691
  category = "main"
1692
  optional = false
1693
  python-versions = ">=3.7, !=3.9.7"
1694
 
1695
  [package.dependencies]
1696
+ altair = ">=3.2.0"
1697
  blinker = ">=1.0.0"
1698
  cachetools = ">=4.0"
1699
  click = ">=7.0"
 
1701
  importlib-metadata = ">=1.4"
1702
  numpy = "*"
1703
  packaging = ">=14.1"
1704
+ pandas = ">=0.21.0"
1705
  pillow = ">=6.2.0"
1706
  protobuf = ">=3.12,<4"
1707
  pyarrow = ">=4.0"
 
1712
  rich = ">=10.11.0"
1713
  semver = "*"
1714
  toml = "*"
1715
+ tornado = ">=5.0"
1716
  typing-extensions = ">=3.10.0.0"
1717
  tzlocal = ">=1.1"
1718
  validators = ">=0.2"
 
2133
 
2134
  [metadata]
2135
  lock-version = "1.1"
2136
+ python-versions = ">=3.8.9,<3.9.7 || >3.9.7,<4.0.0"
2137
+ content-hash = "f7215288fc64984519d9a9ca7b7db5663b34c7727322547d6c8e9e87fdd1161b"
2138
 
2139
  [metadata.files]
2140
  altair = []
pyproject.toml CHANGED
@@ -5,8 +5,8 @@ description = "Visualize and analyze attention patterns for protein language mod
5
  authors = ["Aksel Lenes <[email protected]>"]
6
 
7
  [tool.poetry.dependencies]
8
- python = "^3.8.9"
9
- streamlit = "^1.20.0"
10
  stmol = "^0.0.9"
11
  biopython = "^1.81"
12
  transformers = "^4.27.1"
 
5
  authors = ["Aksel Lenes <[email protected]>"]
6
 
7
  [tool.poetry.dependencies]
8
+ python = ">=3.8.9,<3.9.7 || >3.9.7,<4.0.0"
9
+ streamlit = "1.17"
10
  stmol = "^0.0.9"
11
  biopython = "^1.81"
12
  transformers = "^4.27.1"