Text Generation
Transformers
English
phi3
finance
entity-extraction
ner
phi-3
production
indian-banking
custom_code
4-bit precision
Instructions to use Ranjit0034/finance-entity-extractor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ranjit0034/finance-entity-extractor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ranjit0034/finance-entity-extractor", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ranjit0034/finance-entity-extractor", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Ranjit0034/finance-entity-extractor", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Ranjit0034/finance-entity-extractor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ranjit0034/finance-entity-extractor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ranjit0034/finance-entity-extractor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Ranjit0034/finance-entity-extractor
- SGLang
How to use Ranjit0034/finance-entity-extractor with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Ranjit0034/finance-entity-extractor" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ranjit0034/finance-entity-extractor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Ranjit0034/finance-entity-extractor" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ranjit0034/finance-entity-extractor", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Ranjit0034/finance-entity-extractor with Docker Model Runner:
docker model run hf.co/Ranjit0034/finance-entity-extractor
Upload src/finee/__init__.py with huggingface_hub
Browse files- src/finee/__init__.py +16 -1
src/finee/__init__.py
CHANGED
|
@@ -4,6 +4,13 @@ FinEE - Finance Entity Extractor
|
|
| 4 |
A production-ready library for extracting structured financial entities
|
| 5 |
from Indian banking messages (SMS, email, statements).
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
Example:
|
| 8 |
>>> from finee import extract
|
| 9 |
>>> result = extract("Rs.500 debited from A/c 1234 on 01-01-25")
|
|
@@ -11,9 +18,17 @@ Example:
|
|
| 11 |
500.0
|
| 12 |
>>> print(result.to_json())
|
| 13 |
{"amount": 500.0, "type": "debit", "date": "01-01-2025", ...}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"""
|
| 15 |
|
| 16 |
-
__version__ = "
|
| 17 |
__author__ = "Ranjit Behera"
|
| 18 |
|
| 19 |
from .schema import (
|
|
|
|
| 4 |
A production-ready library for extracting structured financial entities
|
| 5 |
from Indian banking messages (SMS, email, statements).
|
| 6 |
|
| 7 |
+
Features:
|
| 8 |
+
- 🏦 Multi-Bank Support: 25+ Indian banks
|
| 9 |
+
- 💳 All Transaction Types: UPI, NEFT, IMPS, Card, EMI
|
| 10 |
+
- 🌐 Multilingual: English, Hindi, Tamil, Telugu, Bengali, Kannada
|
| 11 |
+
- 🔍 RAG Enhanced: Context-aware extraction
|
| 12 |
+
- ⚡ Fast: <1ms with regex, <100ms with LLM
|
| 13 |
+
|
| 14 |
Example:
|
| 15 |
>>> from finee import extract
|
| 16 |
>>> result = extract("Rs.500 debited from A/c 1234 on 01-01-25")
|
|
|
|
| 18 |
500.0
|
| 19 |
>>> print(result.to_json())
|
| 20 |
{"amount": 500.0, "type": "debit", "date": "01-01-2025", ...}
|
| 21 |
+
|
| 22 |
+
Web UI:
|
| 23 |
+
>>> from finee.ui import launch
|
| 24 |
+
>>> launch() # Opens Gradio UI at http://localhost:7860
|
| 25 |
+
|
| 26 |
+
API Server:
|
| 27 |
+
>>> from finee.api import start_server
|
| 28 |
+
>>> start_server() # Starts FastAPI at http://localhost:8000
|
| 29 |
"""
|
| 30 |
|
| 31 |
+
__version__ = "2.0.0"
|
| 32 |
__author__ = "Ranjit Behera"
|
| 33 |
|
| 34 |
from .schema import (
|