garrettbaber commited on
Commit
a8c5f7d
1 Parent(s): a1fb8a4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -5,9 +5,9 @@ tags:
5
  language:
6
  - en
7
  widget:
8
- - text: "I love AutoTrain"
9
  datasets:
10
- - garrettbaber/autotrain-data-twitter-roberta-base-joy-intensity
11
  co2_eq_emissions:
12
  emissions: 0.03988347977318191
13
  ---
@@ -36,7 +36,7 @@ This model is a fine-tuned version of cardiffnlp/twitter-roberta-base-2022-154m
36
  You can use cURL to access this model:
37
 
38
  ```
39
- $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/garrettbaber/autotrain-twitter-roberta-base-joy-intensity-72771139026
40
  ```
41
 
42
  Or Python API:
@@ -44,11 +44,11 @@ Or Python API:
44
  ```
45
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
46
 
47
- model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/autotrain-twitter-roberta-base-joy-intensity-72771139026", use_auth_token=True)
48
 
49
- tokenizer = AutoTokenizer.from_pretrained("garrettbaber/autotrain-twitter-roberta-base-joy-intensity-72771139026", use_auth_token=True)
50
 
51
- inputs = tokenizer("I love AutoTrain", return_tensors="pt")
52
 
53
  outputs = model(**inputs)
54
  ```
 
5
  language:
6
  - en
7
  widget:
8
+ - text: "I am elated!"
9
  datasets:
10
+ - SemEval-2018-Task-1-Text-Regression-Task
11
  co2_eq_emissions:
12
  emissions: 0.03988347977318191
13
  ---
 
36
  You can use cURL to access this model:
37
 
38
  ```
39
+ $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I am elated!"}' https://api-inference.huggingface.co/models/garrettbaber/twitter-roberta-base-joy-intensity
40
  ```
41
 
42
  Or Python API:
 
44
  ```
45
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
46
 
47
+ model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-roberta-base-joy-intensity")
48
 
49
+ tokenizer = AutoTokenizer.from_pretrained("garrettbaber/twitter-roberta-base-joy-intensity")
50
 
51
+ inputs = tokenizer("I am elated!", return_tensors="pt")
52
 
53
  outputs = model(**inputs)
54
  ```