Spaces:
Build error
Build error
Update model.py
Browse files
model.py
CHANGED
@@ -40,7 +40,7 @@ class UnionModel(nn.Module):
|
|
40 |
def __init__(self, model_path):
|
41 |
super(UnionModel, self).__init__()
|
42 |
|
43 |
-
self.bert_model =
|
44 |
|
45 |
for _, param in self.bert_model.named_parameters():
|
46 |
param.requires_grad = False
|
|
|
40 |
def __init__(self, model_path):
|
41 |
super(UnionModel, self).__init__()
|
42 |
|
43 |
+
self.bert_model = AutoModel.from_pretrained(model_path)
|
44 |
|
45 |
for _, param in self.bert_model.named_parameters():
|
46 |
param.requires_grad = False
|