garrettbaber
commited on
Commit
·
418cf1f
1
Parent(s):
48ae332
Update README.md
Browse files
README.md
CHANGED
@@ -37,7 +37,7 @@ This model is a fine-tuned version of cardiffnlp/twitter-roberta-base-2022-154m
|
|
37 |
You can use cURL to access this model:
|
38 |
|
39 |
```
|
40 |
-
$ 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/twitter-fear-intensity
|
41 |
```
|
42 |
|
43 |
Or Python API:
|
@@ -45,11 +45,20 @@ Or Python API:
|
|
45 |
```
|
46 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
47 |
|
48 |
-
model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-fear-intensity")
|
49 |
|
50 |
-
tokenizer = AutoTokenizer.from_pretrained("garrettbaber/twitter-fear-intensity")
|
51 |
|
52 |
inputs = tokenizer("I'm scared", return_tensors="pt")
|
53 |
|
54 |
outputs = model(**inputs)
|
55 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
You can use cURL to access this model:
|
38 |
|
39 |
```
|
40 |
+
$ 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/twitter-roberta-base-fear-intensity
|
41 |
```
|
42 |
|
43 |
Or Python API:
|
|
|
45 |
```
|
46 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
47 |
|
48 |
+
model = AutoModelForSequenceClassification.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
|
49 |
|
50 |
+
tokenizer = AutoTokenizer.from_pretrained("garrettbaber/twitter-roberta-base-fear-intensity")
|
51 |
|
52 |
inputs = tokenizer("I'm scared", return_tensors="pt")
|
53 |
|
54 |
outputs = model(**inputs)
|
55 |
+
```
|
56 |
+
|
57 |
+
---
|
58 |
+
citation: |
|
59 |
+
@misc{garrettbaber/twitter-roberta-base-fear-intensity,
|
60 |
+
title={Twitter RoBERTa Base Fear Intensity},
|
61 |
+
author={Garrett Baber},
|
62 |
+
year={2023}
|
63 |
+
}
|
64 |
+
---
|