Spaces:
Running
Running
DistilBertForSequenceClassification
Browse files
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
-
from transformers import pipeline, AutoTokenizer,
|
3 |
|
4 |
distilTokenizer = AutoTokenizer.from_pretrained("colinryan/hf-deepmoji")
|
5 |
-
distilModel =
|
|
|
6 |
|
7 |
pipeline = pipeline(task="text-classification", model=distilModel, tokenizer=tokenizer)
|
8 |
|
|
|
1 |
import gradio as gr
|
2 |
+
from transformers import pipeline, AutoTokenizer, DistilBertForSequenceClassification
|
3 |
|
4 |
distilTokenizer = AutoTokenizer.from_pretrained("colinryan/hf-deepmoji")
|
5 |
+
distilModel = DistilBertForSequenceClassification.from_pretrained("colinryan/hf-deepmoji", problem_type="multi_label_classification", num_labels=10)
|
6 |
+
#distilModel = DistilBertForMultilabelSequenceClassification.from_pretrained("colinryan/hf-deepmoji")
|
7 |
|
8 |
pipeline = pipeline(task="text-classification", model=distilModel, tokenizer=tokenizer)
|
9 |
|