Commit
•
dbf08c1
1
Parent(s):
96e8606
Update README.md
Browse files
README.md
CHANGED
@@ -8,7 +8,6 @@ tags:
|
|
8 |
- correction
|
9 |
---
|
10 |
|
11 |
-
- text: "Is this text really worth it?"
|
12 |
|
13 |
# Model Trained Using AutoNLP
|
14 |
|
@@ -33,10 +32,10 @@ tags:
|
|
33 |
|
34 |
## Usage
|
35 |
|
36 |
-
You can use
|
37 |
|
38 |
```
|
39 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "
|
40 |
```
|
41 |
|
42 |
Or Python API:
|
@@ -46,9 +45,13 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
46 |
|
47 |
model = AutoModelForSequenceClassification.from_pretrained("wajidlinux99/gibberish-text-detector", use_auth_token=True)
|
48 |
|
49 |
-
tokenizer = AutoTokenizer.from_pretrained("wajidlinux99/gibberish-text-detector
|
50 |
|
51 |
inputs = tokenizer("Is this text really worth it?", return_tensors="pt")
|
52 |
|
53 |
outputs = model(**inputs)
|
54 |
-
```
|
|
|
|
|
|
|
|
|
|
8 |
- correction
|
9 |
---
|
10 |
|
|
|
11 |
|
12 |
# Model Trained Using AutoNLP
|
13 |
|
|
|
32 |
|
33 |
## Usage
|
34 |
|
35 |
+
You can use CURL to access this model:
|
36 |
|
37 |
```
|
38 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Is this text really worth it?"}' https://api-inference.huggingface.co/models/wajidlinux99/gibberish-text-detector
|
39 |
```
|
40 |
|
41 |
Or Python API:
|
|
|
45 |
|
46 |
model = AutoModelForSequenceClassification.from_pretrained("wajidlinux99/gibberish-text-detector", use_auth_token=True)
|
47 |
|
48 |
+
tokenizer = AutoTokenizer.from_pretrained("wajidlinux99/gibberish-text-detector", use_auth_token=True)
|
49 |
|
50 |
inputs = tokenizer("Is this text really worth it?", return_tensors="pt")
|
51 |
|
52 |
outputs = model(**inputs)
|
53 |
+
```
|
54 |
+
|
55 |
+
# Original Repository
|
56 |
+
|
57 |
+
***madhurjindal/autonlp-Gibberish-Detector-492513457
|