Instructions to use yuneun92/koCSN_SAPR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuneun92/koCSN_SAPR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="yuneun92/koCSN_SAPR")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yuneun92/koCSN_SAPR", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| """ | |
| 모델들 불러오는 모듈 | |
| """ | |
| import torch | |
| # from .load_model import KCSN | |
| # from .arguments import get_train_args | |
| # args = get_train_args() | |
| def load_ner(path ='model/NER.pth'): | |
| """ | |
| NER 모델 | |
| """ | |
| checkpoint = torch.load(path) | |
| model = checkpoint['model'] | |
| model.load_state_dict(checkpoint['model_state_dict']) | |
| return model, checkpoint | |
| # def load_fs(path = 'model/FS.pth'): | |
| # """ | |
| # Find Speaker 모델 | |
| # """ | |
| # model = KCSN(args) | |
| # checkpoint = torch.load(path) | |
| # model.load_state_dict(checkpoint['model_state_dict']) | |
| # return model, checkpoint | |