ramysaidagieb commited on
Commit
c64e053
·
verified ·
1 Parent(s): a1f3bda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,9 +4,9 @@ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
4
  import torch
5
 
6
  # تحميل النموذج والمحول
7
- model_name = "csebuetnlp/mT5_small_arabic_qa"
8
  tokenizer = AutoTokenizer.from_pretrained(model_name)
9
- model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
10
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
  model = model.to(device)
12
 
 
4
  import torch
5
 
6
  # تحميل النموذج والمحول
7
+ model_name = "aubmindlab/bert-base-arabertv2"
8
  tokenizer = AutoTokenizer.from_pretrained(model_name)
9
+ model = AutoModelForSequenceClassification.from_pretrained(model_name)
10
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
11
  model = model.to(device)
12