Commit
·
1264b70
1
Parent(s):
d6e89ad
Update testforhuggingface.py
Browse files- testforhuggingface.py +4 -4
testforhuggingface.py
CHANGED
@@ -8,7 +8,7 @@ Original file is located at
|
|
8 |
"""
|
9 |
|
10 |
# Commented out IPython magic to ensure Python compatibility.
|
11 |
-
|
12 |
|
13 |
|
14 |
!pip install git+'https://github.com/miladansari/protein_bert.git'
|
@@ -29,8 +29,8 @@ from pandas import read_csv
|
|
29 |
|
30 |
#reading files.
|
31 |
|
32 |
-
test = read_csv('
|
33 |
-
train = read_csv('
|
34 |
|
35 |
seqs=train['seq']
|
36 |
seqs_test=test['seq']
|
@@ -44,7 +44,7 @@ from proteinbert import load_pretrained_model
|
|
44 |
from proteinbert.conv_and_global_attention_model import get_model_with_hidden_layers_as_outputs
|
45 |
|
46 |
#load pretrained model.
|
47 |
-
pretrained_model_generator, input_encoder = load_pretrained_model(local_model_dump_dir='
|
48 |
model = get_model_with_hidden_layers_as_outputs(pretrained_model_generator.create_model(seq_len))
|
49 |
|
50 |
#extract local representaion (Embeddings).
|
|
|
8 |
"""
|
9 |
|
10 |
# Commented out IPython magic to ensure Python compatibility.
|
11 |
+
|
12 |
|
13 |
|
14 |
!pip install git+'https://github.com/miladansari/protein_bert.git'
|
|
|
29 |
|
30 |
#reading files.
|
31 |
|
32 |
+
test = read_csv('hemolytic.test.csv',skipinitialspace=True)
|
33 |
+
train = read_csv('hemolytic.train.csv',skipinitialspace=True)
|
34 |
|
35 |
seqs=train['seq']
|
36 |
seqs_test=test['seq']
|
|
|
44 |
from proteinbert.conv_and_global_attention_model import get_model_with_hidden_layers_as_outputs
|
45 |
|
46 |
#load pretrained model.
|
47 |
+
pretrained_model_generator, input_encoder = load_pretrained_model(local_model_dump_dir='proteinbert_preModel')
|
48 |
model = get_model_with_hidden_layers_as_outputs(pretrained_model_generator.create_model(seq_len))
|
49 |
|
50 |
#extract local representaion (Embeddings).
|