Mohssinibra commited on
Commit
2855355
·
verified ·
1 Parent(s): 2785b50
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -24,7 +24,8 @@ translation_model = MarianMTModel.from_pretrained(translation_model_name).to(dev
24
  # AraBERT for Darija topic classification
25
  arabert_model_name = "aubmindlab/bert-base-arabert"
26
  arabert_tokenizer = AutoTokenizer.from_pretrained(arabert_model_name)
27
- arabert_model = AutoModel.from_pretrained(arabert_model_name).to(device)
 
28
 
29
  # BERT for English topic classification
30
  bert_model_name = "bert-base-uncased"
 
24
  # AraBERT for Darija topic classification
25
  arabert_model_name = "aubmindlab/bert-base-arabert"
26
  arabert_tokenizer = AutoTokenizer.from_pretrained(arabert_model_name)
27
+ arabert_model = BertForSequenceClassification.from_pretrained(arabert_model_name, num_labels=2).to(device)
28
+
29
 
30
  # BERT for English topic classification
31
  bert_model_name = "bert-base-uncased"