adarsh
commited on
Commit
·
a7ef5db
1
Parent(s):
a668ee2
updated model path
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ label_dict = {"Urgency": 0, "Not Dark Pattern": 1, "Scarcity": 2, "Misdirection"
|
|
11 |
model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=len(label_dict))
|
12 |
|
13 |
# Load fine-tuned weights
|
14 |
-
fine_tuned_model_path =
|
15 |
model.load_state_dict(torch.load(fine_tuned_model_path, map_location=torch.device('cpu')))
|
16 |
|
17 |
# Preprocess the new text
|
|
|
11 |
model = BertForSequenceClassification.from_pretrained("bert-base-uncased", num_labels=len(label_dict))
|
12 |
|
13 |
# Load fine-tuned weights
|
14 |
+
fine_tuned_model_path = "models/finetuned_BERT_epoch_5.model"
|
15 |
model.load_state_dict(torch.load(fine_tuned_model_path, map_location=torch.device('cpu')))
|
16 |
|
17 |
# Preprocess the new text
|