CDRI-Eddy commited on
Commit
3a7e2ee
ยท
verified ยท
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)