Spaces:
Running
Running
ThanaritKanjanametawat
commited on
Commit
·
2287a5c
1
Parent(s):
cf62d27
change the device to cpu only 2
Browse files- ModelDriver.py +0 -1
ModelDriver.py
CHANGED
@@ -15,7 +15,6 @@ class MLP(nn.Module):
|
|
15 |
x = self.fc2(x)
|
16 |
return x
|
17 |
def extract_features(text):
|
18 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
19 |
|
20 |
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
|
21 |
model = RobertaModel.from_pretrained("roberta-base").to(device)
|
|
|
15 |
x = self.fc2(x)
|
16 |
return x
|
17 |
def extract_features(text):
|
|
|
18 |
|
19 |
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
|
20 |
model = RobertaModel.from_pretrained("roberta-base").to(device)
|