Update README.md
Browse files
README.md
CHANGED
@@ -42,11 +42,17 @@ Or Python API:
|
|
42 |
```
|
43 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
44 |
|
|
|
|
|
|
|
|
|
45 |
model = AutoModelForSequenceClassification.from_pretrained("Shenzy/Sentence_Classification4DesignTutor", use_auth_token=True)
|
46 |
|
47 |
tokenizer = AutoTokenizer.from_pretrained("Shenzy/Sentence_Classification4DesignTutor", use_auth_token=True)
|
48 |
|
49 |
-
inputs = tokenizer("
|
50 |
|
51 |
outputs = model(**inputs)
|
|
|
|
|
52 |
```
|
|
|
42 |
```
|
43 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
44 |
|
45 |
+
import numpy as np
|
46 |
+
|
47 |
+
labdic ={ 0: "rationale", 1: "suggestion", 2: "specific_critique"}
|
48 |
+
|
49 |
model = AutoModelForSequenceClassification.from_pretrained("Shenzy/Sentence_Classification4DesignTutor", use_auth_token=True)
|
50 |
|
51 |
tokenizer = AutoTokenizer.from_pretrained("Shenzy/Sentence_Classification4DesignTutor", use_auth_token=True)
|
52 |
|
53 |
+
inputs = tokenizer("An unusual hierarchy in the section near the top where the design seems to prioritise running time over a compacted artist name.", return_tensors="pt")
|
54 |
|
55 |
outputs = model(**inputs)
|
56 |
+
|
57 |
+
print(labdic[np.argmax(outputs)])
|
58 |
```
|