Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,10 @@ import transformers
|
|
4 |
|
5 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
6 |
|
7 |
-
class Model(
|
8 |
def __init__(self):
|
9 |
super(Model).__init__()
|
|
|
10 |
self.bert = transformers.AutoModelForSequenceClassification.from_pretrained("ayse/distilbert-english-finetuned", config=self.config, map_location=device)
|
11 |
self.tokenizer = transformers.AutoTokenizer.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
|
12 |
|
|
|
4 |
|
5 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
6 |
|
7 |
+
class Model(torcn.nn.Module):
|
8 |
def __init__(self):
|
9 |
super(Model).__init__()
|
10 |
+
self.config = transformers.DistilBertConfig()
|
11 |
self.bert = transformers.AutoModelForSequenceClassification.from_pretrained("ayse/distilbert-english-finetuned", config=self.config, map_location=device)
|
12 |
self.tokenizer = transformers.AutoTokenizer.from_pretrained("distilbert-base-uncased-finetuned-sst-2-english")
|
13 |
|