Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ class RaceClassifier(nn.Module):
|
|
11 |
|
12 |
def __init__(self, n_classes):
|
13 |
super(RaceClassifier, self).__init__()
|
14 |
-
self.bert = AutoModel.from_pretrained("vinai/bertweet-
|
15 |
self.drop = nn.Dropout(p=0.3) # can be changed in future
|
16 |
self.out = nn.Linear(self.bert.config.hidden_size,
|
17 |
n_classes) # linear layer for the output with the number of classes
|
@@ -104,7 +104,7 @@ def predict(*text):
|
|
104 |
print(tweets)
|
105 |
sentences = tweets
|
106 |
|
107 |
-
tokenizer = AutoTokenizer.from_pretrained("vinai/bertweet-
|
108 |
|
109 |
encoded_sentences = tokenizer(
|
110 |
sentences,
|
|
|
11 |
|
12 |
def __init__(self, n_classes):
|
13 |
super(RaceClassifier, self).__init__()
|
14 |
+
self.bert = AutoModel.from_pretrained("vinai/bertweet-large")
|
15 |
self.drop = nn.Dropout(p=0.3) # can be changed in future
|
16 |
self.out = nn.Linear(self.bert.config.hidden_size,
|
17 |
n_classes) # linear layer for the output with the number of classes
|
|
|
104 |
print(tweets)
|
105 |
sentences = tweets
|
106 |
|
107 |
+
tokenizer = AutoTokenizer.from_pretrained("vinai/bertweet-large", normalization=True)
|
108 |
|
109 |
encoded_sentences = tokenizer(
|
110 |
sentences,
|