Spaces:
Sleeping
Sleeping
Update model.py
Browse files
model.py
CHANGED
@@ -25,8 +25,8 @@ stopwords = stopwords_list()
|
|
25 |
# Load the BERT model for sentiment analysis
|
26 |
dataset = Dataset.from_pandas(pd.DataFrame({"Comment": []}))
|
27 |
|
28 |
-
tokenizer = AutoTokenizer.from_pretrained("HooshvareLab/bert-
|
29 |
-
model = BertForSequenceClassification.from_pretrained("HooshvareLab/bert-
|
30 |
|
31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
32 |
model.to(device)
|
|
|
25 |
# Load the BERT model for sentiment analysis
|
26 |
dataset = Dataset.from_pandas(pd.DataFrame({"Comment": []}))
|
27 |
|
28 |
+
tokenizer = AutoTokenizer.from_pretrained("HooshvareLab/bert-base-parsbert-uncased")
|
29 |
+
model = BertForSequenceClassification.from_pretrained("HooshvareLab/bert-base-parsbert-uncased", num_labels=3)
|
30 |
|
31 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
32 |
model.to(device)
|