Downloads · 30 days
4
3% of all-time downloads
MongsangGa/home_life_improved-onnx
home_life_improved-onnx is a text classification model from MongsangGa. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Downloads · 30 days
4
3% of all-time downloads
All-time downloads
121
Public
Repo size
545 MB
Likes
0
Public
Click a slice to open those files.
.onnx273 MB · 100%
From the Hugging Face model README
개선된 생활 카테고리 분류 모델 (ONNX 버전)
이 모델은 한국어 생활 관련 질문을 8개 카테고리로 분류하는 BERT 기반 분류 모델입니다.
import onnxruntime as ort
import numpy as np
from transformers import BertTokenizer
# 모델 로드
tokenizer = BertTokenizer.from_pretrained("MongsangGa/home_life_improved-onnx")
session = ort.InferenceSession("model.onnx")
# 추론
text = "김치찌개 맛있게 끓이는 방법"
inputs = tokenizer(text, truncation=True, padding="max_length", max_length=128, return_tensors="np")
ort_inputs = {
"input_ids": inputs["input_ids"].astype(np.int64),
"attention_mask": inputs["attention_mask"].astype(np.int64)
}
logits = session.run(None, ort_inputs)[0]
Apache 2.0