ONNX-based emotion detection using quantized RoBERTa
Project description
📦 txtemo
txtemo is a lightweight, production-ready Python package for sentiment/emotion detection using a quantized RoBERTa model exported to ONNX.
It runs fast on CPU, making it suitable for local apps, servers, and even lightweight devices.
🚀 Features
- ✅ Quantized RoBERTa ONNX model for speed & efficiency
- ✅ Runs fully on CPU (no GPU required)
- ✅ Easy-to-use Python API
- ✅ Hugging Face Hub integration (auto-downloads model + tokenizer)
- ✅ Returns both labels (Positive/Negative/Neutral) and confidence score
📥 Installation
pip install txtemo
📝 Usage
from txtemo import predict
print(predict("I love this AI model!"))
# ('Positive 😃', 0.92)
print(predict("This is the worst thing ever."))
# ('Negative 😡', 0.89)
print(predict("Pranesh"))
# ('Neutral 😐', 0.75)
🖥️ Command Line Interface (CLI)
You can also use txtemo directly from the command line:
txtemo "This library is amazing!"
# Output: Positive 😃 (0.92)
📊 Labels
- Negative 😡
- Neutral 😐
- Positive 😃
⚡ Performance
- Model: RoBERTa-base (quantized, ONNX)
- Average inference speed: ~3x faster than PyTorch version
- Memory footprint: Reduced by 50%+
🌍 Use Cases
- Chatbots 🤖
- Customer feedback analysis 📢
- Social media monitoring 📱
- Product reviews sentiment 🛒
🔗 Model Source
Hosted on Hugging Face Hub:
PraneshJs/Emotion-detection-Text
📌 Author
Pranesh S
📧 Contact: [praneshmadhan646@gmail.com]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file txtemo-0.1.0.tar.gz.
File metadata
- Download URL: txtemo-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6245352f02360e0b688a24893a87bcc7552923ad4f8b5dafea510bbf0f235c03
|
|
| MD5 |
a80d2bd502c04460ea9a06b7179daa99
|
|
| BLAKE2b-256 |
16cbec37c3fdc3585aaf86216bce8cad4f68457ea251b7cb7e1042372e1567ed
|
File details
Details for the file txtemo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: txtemo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83c93bd8fb9b1c37fd70257fc7e1a747188f784c0f5a28d11ad659c053a0bb2b
|
|
| MD5 |
673e52cd4c05b91913a7dc550701487b
|
|
| BLAKE2b-256 |
82ddc0855b100289387aa5f4ddd4a778f36abb86f940e47def39521d99961818
|