Update README.md
Browse files
README.md
CHANGED
@@ -62,4 +62,22 @@ The following hyperparameters were used during training:
|
|
62 |
- Transformers 4.35.0
|
63 |
- Pytorch 2.1.0
|
64 |
- Datasets 2.14.6
|
65 |
-
- Tokenizers 0.14.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
- Transformers 4.35.0
|
63 |
- Pytorch 2.1.0
|
64 |
- Datasets 2.14.6
|
65 |
+
- Tokenizers 0.14.1
|
66 |
+
|
67 |
+
## Inference API
|
68 |
+
μ΄ μΉμ
μμλ `bert-base-uncased` λͺ¨λΈμ μ¬μ©νμ¬ ν
μ€νΈ λΆλ₯ μμ
μ μννλ λ°©λ²μ 보μ¬μ£Όλ μμ μ½λλ₯Ό λ³κ²½ν μ μμ΅λλ€.
|
69 |
+
|
70 |
+
```python
|
71 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
|
72 |
+
|
73 |
+
model_name = "CDRI-Eddy/ingredients_classification_model"
|
74 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
75 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
76 |
+
|
77 |
+
nlp = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
78 |
+
|
79 |
+
# μμ μ
λ ₯ λ¬Έμ₯ λ³κ²½
|
80 |
+
input_sentence = "Here is the sentence you want the model to classify."
|
81 |
+
result = nlp(input_sentence)
|
82 |
+
|
83 |
+
print(result)
|