Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import numpy as np
|
2 |
-
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
3 |
from transformers import set_seed
|
4 |
import torch
|
5 |
import torch.nn as nn
|
@@ -16,7 +16,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_checkpoint1)
|
|
16 |
class MyModel(nn.Module):
|
17 |
def __init__(self):
|
18 |
super().__init__()
|
19 |
-
self.bert1 =
|
20 |
# for param in self.bert1.parameters():
|
21 |
# param.requires_grad = False
|
22 |
self.bn1 = nn.BatchNorm1d(256)
|
|
|
1 |
import numpy as np
|
2 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification,EsmForSequenceClassification
|
3 |
from transformers import set_seed
|
4 |
import torch
|
5 |
import torch.nn as nn
|
|
|
16 |
class MyModel(nn.Module):
|
17 |
def __init__(self):
|
18 |
super().__init__()
|
19 |
+
self.bert1 = EsmForSequenceClassification.from_pretrained(model_checkpoint1, num_labels=512)#3000
|
20 |
# for param in self.bert1.parameters():
|
21 |
# param.requires_grad = False
|
22 |
self.bn1 = nn.BatchNorm1d(256)
|