Pendrokar commited on
Commit
b2eb1be
1 Parent(s): 0fd5020

DistilBertForSequenceClassification

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
2
- from transformers import pipeline, AutoTokenizer, DistilBertForMultilabelSequenceClassification
3
 
4
  distilTokenizer = AutoTokenizer.from_pretrained("colinryan/hf-deepmoji")
5
- distilModel = DistilBertForMultilabelSequenceClassification.from_pretrained("colinryan/hf-deepmoji")
 
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