CDRI-Eddy commited on
Commit
3a7e2ee
β€’
1 Parent(s): 7e05d63

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -1
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)