yinuozhang
commited on
Commit
•
b84fc7f
1
Parent(s):
ea1d1a6
reupload
Browse files- .gitattributes +3 -0
- README.md +31 -0
- model/pytorch_model.bin +0 -3
- setup.py +1 -1
.gitattributes
CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
model/pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
37 |
+
model/stage1_model.bin filter=lfs diff=lfs merge=lfs -text
|
38 |
+
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -10,6 +10,37 @@ The bioremediation of environments contaminated with heavy metals is an importan
|
|
10 |
|
11 |
Inference instruction will be released soon.
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# Repo Author
|
15 |
- Yinuo Zhang ([email protected])
|
|
|
10 |
|
11 |
Inference instruction will be released soon.
|
12 |
|
13 |
+
## Interactive Demo
|
14 |
+
|
15 |
+
You can try out the MetaLATTE model directly in your browser:
|
16 |
+
|
17 |
+
<iframe
|
18 |
+
src="https://huggingface.co/spaces/ChatterjeeLab/MetaLATTE-demo"
|
19 |
+
frameborder="0"
|
20 |
+
width="850"
|
21 |
+
height="450"
|
22 |
+
></iframe>
|
23 |
+
|
24 |
+
## Usage
|
25 |
+
|
26 |
+
```python
|
27 |
+
from transformers import AutoTokenizer, AutoModel, AutoConfig
|
28 |
+
|
29 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D")
|
30 |
+
config = AutoConfig.from_pretrained("ChatterjeeLab/MetaLATTE")
|
31 |
+
model = AutoModel.from_pretrained("ChatterjeeLab/MetaLATTE", config=config)
|
32 |
+
|
33 |
+
# Use the model
|
34 |
+
sequence = "AVYNIGWSFNVNGARGKSFRAGDVLVFKYIKGQHNVVAVNGRGYASCSAPRGARTYSSGQDRIKLTRGQNYFICSFPGHCGGGMKIAINAK"
|
35 |
+
inputs = tokenizer(sequence, return_tensors="pt")
|
36 |
+
raw_probs, predictions = model(**inputs)
|
37 |
+
|
38 |
+
id2label = config.id2label
|
39 |
+
predicted_labels = [id2label[i] for i, pred in enumerate(predictions[0]) if pred == 1]
|
40 |
+
print(predicted_labels)
|
41 |
+
['Cu']
|
42 |
+
|
43 |
+
```
|
44 |
|
45 |
# Repo Author
|
46 |
- Yinuo Zhang ([email protected])
|
model/pytorch_model.bin
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:4a4b1eda0e66924a059f0bd2b6210142d24d37049bef6908ada05fb9195a83da
|
3 |
-
size 5676931901
|
|
|
|
|
|
|
|
setup.py
CHANGED
@@ -11,7 +11,7 @@ setup(
|
|
11 |
"torch==2.0.1+cu117",
|
12 |
"numpy==1.22.4",
|
13 |
"lightning==2.1.2",
|
14 |
-
"transformers
|
15 |
],
|
16 |
python_requires='>=3.8',
|
17 |
)
|
|
|
11 |
"torch==2.0.1+cu117",
|
12 |
"numpy==1.22.4",
|
13 |
"lightning==2.1.2",
|
14 |
+
"transformers>=4.38.2",
|
15 |
],
|
16 |
python_requires='>=3.8',
|
17 |
)
|