steveyu323 commited on
Commit
d24e84a
·
verified ·
1 Parent(s): 45781e0

Upload folder using huggingface_hub

Browse files
.ipynb_checkpoints/README-checkpoint.md CHANGED
@@ -3,7 +3,7 @@ tags:
3
  - protein
4
  - biology
5
  - kinase
6
- - sequence-classification
7
  ---
8
 
9
  # Kinase–Substrate Interaction Classifier
 
3
  - protein
4
  - biology
5
  - kinase
6
+ pipeline_tag: text-classification
7
  ---
8
 
9
  # Kinase–Substrate Interaction Classifier
.ipynb_checkpoints/config-checkpoint.json CHANGED
@@ -1,30 +1,21 @@
1
- from modeling import KinaseSubstrateConfig, KinaseSubstrateModel
2
- import torch
3
-
4
- # Build config
5
- config = KinaseSubstrateConfig(
6
- tape_model_name="bert-base",
7
- num_labels=2,
8
- threshold=ckpt["threshold"], # from your checkpoint
9
- with_sep=True,
10
- max_len=1024,
11
- # Tell HF where to find the custom classes:
12
- auto_map={
13
- "AutoConfig": "modeling.KinaseSubstrateConfig",
14
- "AutoModel": "modeling.KinaseSubstrateModel",
15
- },
16
- custom_pipelines={
17
- "kinase-substrate": {
18
- "impl": "pipeline.KinaseSubstratePipeline",
19
- "pt": ["AutoModel"],
20
- }
21
- },
22
- )
23
-
24
- # Build and load model
25
- model = KinaseSubstrateModel(config)
26
- model.backbone.load_state_dict(ckpt["state_dict"]) # load your trained weights
27
-
28
- # Save
29
- model.save_pretrained("./my_kinase_model")
30
- config.save_pretrained("./my_kinase_model")
 
1
+ {
2
+ "model_type": "kinase_substrate_bert",
3
+ "pipeline_tag": "text-classification",
4
+ "tape_model_name": "bert-base",
5
+ "num_labels": 2,
6
+ "threshold": 0.7734375,
7
+ "with_sep": true,
8
+ "max_len": 1024,
9
+ "auto_map": {
10
+ "AutoConfig": "modeling.KinaseSubstrateConfig",
11
+ "AutoModel": "modeling.KinaseSubstrateModel"
12
+ },
13
+ "custom_pipelines": {
14
+ "kinase-substrate": {
15
+ "impl": "pipeline.KinaseSubstratePipeline",
16
+ "pt": [
17
+ "AutoModel"
18
+ ]
19
+ }
20
+ }
21
+ }
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -3,7 +3,7 @@ tags:
3
  - protein
4
  - biology
5
  - kinase
6
- - sequence-classification
7
  ---
8
 
9
  # Kinase–Substrate Interaction Classifier
 
3
  - protein
4
  - biology
5
  - kinase
6
+ pipeline_tag: text-classification
7
  ---
8
 
9
  # Kinase–Substrate Interaction Classifier
config.json CHANGED
@@ -1,5 +1,6 @@
1
  {
2
  "model_type": "kinase_substrate_bert",
 
3
  "tape_model_name": "bert-base",
4
  "num_labels": 2,
5
  "threshold": 0.7734375,
 
1
  {
2
  "model_type": "kinase_substrate_bert",
3
+ "pipeline_tag": "text-classification",
4
  "tape_model_name": "bert-base",
5
  "num_labels": 2,
6
  "threshold": 0.7734375,