📦 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]
Release files for txtemo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| txtemo-0.1.0.tar.gz | 2.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| txtemo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.5 kB
Release files / txtemo-0.1.0.tar.gz
| Download URL | txtemo-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6245352f02360e0b688a24893a87bcc7552923ad4f8b5dafea510bbf0f235c03
|
|
BLAKE2b-256 checksum How to use checksums |
16cbec37c3fdc3585aaf86216bce8cad4f68457ea251b7cb7e1042372e1567ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / txtemo-0.1.0-py3-none-any.whl
| Download URL | txtemo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83c93bd8fb9b1c37fd70257fc7e1a747188f784c0f5a28d11ad659c053a0bb2b
|
|
BLAKE2b-256 checksum How to use checksums |
82ddc0855b100289387aa5f4ddd4a778f36abb86f940e47def39521d99961818
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|