Update README.md
Browse files
README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
tags: autotrain
|
3 |
language: tr
|
4 |
widget:
|
5 |
-
- text: "
|
6 |
datasets:
|
7 |
- emre/autotrain-data-turkish-sentiment-analysis
|
8 |
co2_eq_emissions: 120.82460124309924
|
@@ -34,7 +34,7 @@ co2_eq_emissions: 120.82460124309924
|
|
34 |
You can use cURL to access this model:
|
35 |
|
36 |
```
|
37 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "
|
38 |
```
|
39 |
|
40 |
Or Python API:
|
@@ -42,11 +42,11 @@ Or Python API:
|
|
42 |
```
|
43 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
44 |
|
45 |
-
model = AutoModelForSequenceClassification.from_pretrained("emre/
|
46 |
|
47 |
-
tokenizer = AutoTokenizer.from_pretrained("emre/
|
48 |
|
49 |
-
inputs = tokenizer("
|
50 |
|
51 |
outputs = model(**inputs)
|
52 |
```
|
|
|
2 |
tags: autotrain
|
3 |
language: tr
|
4 |
widget:
|
5 |
+
- text: "Bu ürün gerçekten güzel çıktı"
|
6 |
datasets:
|
7 |
- emre/autotrain-data-turkish-sentiment-analysis
|
8 |
co2_eq_emissions: 120.82460124309924
|
|
|
34 |
You can use cURL to access this model:
|
35 |
|
36 |
```
|
37 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Bu ürün gerçekten güzel çıktı"}' https://api-inference.huggingface.co/models/emre/turkish-sentiment-analysis
|
38 |
```
|
39 |
|
40 |
Or Python API:
|
|
|
42 |
```
|
43 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
44 |
|
45 |
+
model = AutoModelForSequenceClassification.from_pretrained("emre/turkish-sentiment-analysis", use_auth_token=True)
|
46 |
|
47 |
+
tokenizer = AutoTokenizer.from_pretrained("emre/turkish-sentiment-analysis", use_auth_token=True)
|
48 |
|
49 |
+
inputs = tokenizer("Bu ürün gerçekten güzel çıktı", return_tensors="pt")
|
50 |
|
51 |
outputs = model(**inputs)
|
52 |
```
|