--- language: - hi - en library_name: transformers tags: - sentiment-analysis - hinglish - onnx --- # Hinglish sentiment models Two Hinglish (Hindi-English code-mixed) sentiment models. | Folder | Description | |---|---| | `model_1.0/` | Newer model with better accuracy. Contains `hinglish_model_checkpoint` (PyTorch), `hinglish_onnx_model` (ONNX) and `hinglish_onnx_fp16` (optimized fp16 ONNX). | | `model_-1.0/` | Older model with better speed (optimized ONNX). | ## Usage ```python from transformers import AutoTokenizer, AutoModelForSequenceClassification repo = "v-krishna07/hinglish-models" sub = "model_1.0/hinglish_model_checkpoint" tok = AutoTokenizer.from_pretrained(repo, subfolder=sub) model = AutoModelForSequenceClassification.from_pretrained(repo, subfolder=sub) ``` For the ONNX folders, use `optimum`: ```python from optimum.onnxruntime import ORTModelForSequenceClassification model = ORTModelForSequenceClassification.from_pretrained( repo, subfolder="model_-1.0", file_name="model_optimized.onnx" ) ```