Commit
•
3e2b32c
1
Parent(s):
d8fd901
Update README.md
Browse files
README.md
CHANGED
@@ -65,19 +65,14 @@ It will likely make more sense to use this model in the context of a 'human in t
|
|
65 |
You can use cURL to access this model:
|
66 |
|
67 |
```
|
68 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "
|
69 |
```
|
70 |
|
71 |
-
|
72 |
|
73 |
```
|
74 |
-
from transformers import
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
tokenizer = AutoTokenizer.from_pretrained("davanstrien/autotrain-cultural_heritage_metadata_accuracy-48840118272", use_auth_token=True)
|
79 |
-
|
80 |
-
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
81 |
-
|
82 |
-
outputs = model(**inputs)
|
83 |
```
|
|
|
65 |
You can use cURL to access this model:
|
66 |
|
67 |
```
|
68 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Elemento di decorazione architettonica a rilievo"}' https://api-inference.huggingface.co/models/davanstrien/autotrain-cultural_heritage_metadata_accuracy-48840118272
|
69 |
```
|
70 |
|
71 |
+
You can also use the model locally be leveraging a Transformers [pipeline](https://huggingface.co/docs/transformers/pipeline_tutorial)
|
72 |
|
73 |
```
|
74 |
+
from transformers import pipeline
|
75 |
|
76 |
+
pipe = pipeline('text-classification', model='biglam/cultural_heritage_metadata_accuracy')
|
77 |
+
pipe("Elemento di decorazione architettonica a rilievo")
|
|
|
|
|
|
|
|
|
|
|
78 |
```
|