Instructions to use v-krishna07/hinglish-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use v-krishna07/hinglish-models with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("v-krishna07/hinglish-models", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from v-krishna07/hinglish-models: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/v-krishna07/hinglish-models/resolve/main/README.md
- Command line
-
hf download hf://v-krishna07/hinglish-models/README.md
-
curl -L -o README.md https://huggingface.co/v-krishna07/hinglish-models/resolve/main/README.md
1.04 kB
metadata
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
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:
from optimum.onnxruntime import ORTModelForSequenceClassification
model = ORTModelForSequenceClassification.from_pretrained(
repo, subfolder="model_-1.0", file_name="model_optimized.onnx"
)