Spaces:
Running
Running
multi
Browse files
app.py
CHANGED
@@ -4,10 +4,10 @@ from transformers import pipeline, AutoTokenizer, DistilBertForSequenceClassific
|
|
4 |
|
5 |
modelName = "Pendrokar/TorchMoji"
|
6 |
|
7 |
-
|
8 |
#distil_tokenizer.save_pretrained("./model/")
|
9 |
-
distil_model = DistilBertForSequenceClassification.from_pretrained(modelName, problem_type="multi_label_classification")
|
10 |
-
|
11 |
#num_labels = len(model.config.id2label)
|
12 |
|
13 |
#pipeline = pipeline(task="text-classification", model=distil_model, tokenizer=distil_tokenizer)
|
|
|
4 |
|
5 |
modelName = "Pendrokar/TorchMoji"
|
6 |
|
7 |
+
distil_tokenizer = AutoTokenizer.from_pretrained(modelName)
|
8 |
#distil_tokenizer.save_pretrained("./model/")
|
9 |
+
#distil_model = DistilBertForSequenceClassification.from_pretrained(modelName, problem_type="multi_label_classification")
|
10 |
+
distil_model = DistilBertForMultilabelSequenceClassification.from_pretrained("colinryan/hf-deepmoji")
|
11 |
#num_labels = len(model.config.id2label)
|
12 |
|
13 |
#pipeline = pipeline(task="text-classification", model=distil_model, tokenizer=distil_tokenizer)
|