alex-abb commited on
Commit
9277ff4
1 Parent(s): 5a974a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import datasets
2
  from datasets import load_dataset
3
  import transformers
4
- from transformers import TFAutoModelForSequenceClassification, AutoTokenizer
5
 
6
- model = TFAutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
7
  tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
8
  model = BertForSequenceClassification.from_pretrained(model_name, num_labels=2) # 2 classes : positif et négatif
9
 
 
1
  import datasets
2
  from datasets import load_dataset
3
  import transformers
4
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer, Trainer, TrainingArguments, pipeline
5
 
6
+ model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=2) # 2 classes : positif et négatif
7
  tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
8
  model = BertForSequenceClassification.from_pretrained(model_name, num_labels=2) # 2 classes : positif et négatif
9