philschmid commited on
Commit
7c55580
·
1 Parent(s): 11cc824

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -14
README.md CHANGED
@@ -2,15 +2,31 @@
2
  tags: autonlp
3
  language: en
4
  widget:
5
- - text: "I love AutoNLP 🤗"
6
  datasets:
7
- - philschmid/autonlp-data-tweet_eval_vs_comprehend
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ---
9
-
10
- # Model Trained Using AutoNLP
11
-
12
  - Problem type: Multi-class Classification
13
- - Model ID: 3092245
14
 
15
  ## Validation Metrics
16
 
@@ -32,19 +48,19 @@ datasets:
32
  You can use cURL to access this model:
33
 
34
  ```
35
- $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/philschmid/autonlp-tweet_eval_vs_comprehend-3092245
36
  ```
37
 
38
  Or Python API:
39
 
40
- ```
41
- from transformers import AutoModelForSequenceClassification, AutoTokenizer
42
-
43
- model = AutoModelForSequenceClassification.from_pretrained("philschmid/autonlp-tweet_eval_vs_comprehend-3092245", use_auth_token=True)
44
 
45
- tokenizer = AutoTokenizer.from_pretrained("philschmid/autonlp-tweet_eval_vs_comprehend-3092245", use_auth_token=True)
46
 
47
- inputs = tokenizer("I love AutoNLP", return_tensors="pt")
 
48
 
49
- outputs = model(**inputs)
 
50
  ```
 
2
  tags: autonlp
3
  language: en
4
  widget:
5
+ - text: "Worry is a down payment on a problem you may never have'. Joyce Meyer. #motivation #leadership #worry"
6
  datasets:
7
+ - banking77
8
+ model-index:
9
+ - name: RoBERTa-Banking77
10
+ results:
11
+ - task:
12
+ name: Sentiment Analysis
13
+ type: sentimenty-analysis
14
+ dataset:
15
+ name: "Tweet eval"
16
+ type: tweeteval
17
+ metrics:
18
+ - name: Accuracy
19
+ type: accuracy
20
+ value: 80.59
21
+ - name: Macro F1
22
+ type: macro-f1
23
+ value: 78.17
24
+ - name: Weighted F1
25
+ type: weighted-f1
26
+ value: 80.11
27
  ---
28
+ # `DistilBERT-tweet-eval-emotion` trained using autoNLP
 
 
29
  - Problem type: Multi-class Classification
 
30
 
31
  ## Validation Metrics
32
 
 
48
  You can use cURL to access this model:
49
 
50
  ```
51
+ $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Worry is a down payment on a problem you may never have'. Joyce Meyer. #motivation #leadership #worry"}' https://api-inference.huggingface.co/models/philschmid/autonlp-tweet_eval_vs_comprehend-3092245
52
  ```
53
 
54
  Or Python API:
55
 
56
+ ```py
57
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
 
 
58
 
59
+ model_id = 'philschmid/DistilBERT-tweet-eval-emotion'
60
 
61
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
62
+ model = AutoModelForSequenceClassification.from_pretrained(model_id)
63
 
64
+ classifier = pipeline('text-classification', tokenizer=tokenizer, model=model)
65
+ classifier("Worry is a down payment on a problem you may never have'. Joyce Meyer. #motivation #leadership #worry")
66
  ```