Nexora is a lightweight Python toolkit for working with AI models and machine learning capabilities.
The project is designed as a modular AI ecosystem, providing a unified Python interface for different model families and capabilities.
Install Nexora from PyPI:
pip install nexora-aiThe OCR module provides a simple interface for extracting text from images.
from nexora.ocr import NexoraOCR
ocr = NexoraOCR()
result = ocr.read("image.png")
print(result)Nexora automatically loads the selected OCR model when inference is requested.
Nexora supports multiple OCR models through the model parameter.
If no model is specified, Nexora uses the 0.8B model:
from nexora.ocr import NexoraOCR
ocr = NexoraOCR()
result = ocr.read("image.png")
print(result.text)To use the 2B model:
from nexora.ocr import NexoraOCR
ocr = NexoraOCR(model="nexora-ocr-v0.1-2b")
result = ocr.read("image.png")
print(result.text)You can retrieve the currently supported OCR models without loading a model:
from nexora.ocr import NexoraOCR
models = NexoraOCR.available_models()
print(models)Available models currently include:
nexora-ocr-v0.1-0.8b
nexora-ocr-v0.1-2b
The model names are resolved internally to their corresponding model repositories.
The OCR module provides an interface for extracting text from images using Nexora OCR models.
from nexora.ocr import NexoraOCR
ocr = NexoraOCR(model="nexora-ocr-v0.1-2b")
result = ocr.read("image.png")
print(result.text)The API is designed to keep OCR inference simple while allowing the underlying models and implementation to evolve independently.
Nexora supports automatic device selection as well as explicit device configuration.
from nexora.ocr import NexoraOCR
ocr = NexoraOCR(
model="nexora-ocr-v0.1-2b",
device="auto",
)
result = ocr.read("image.png")
print(result.text)The default device configuration is auto.
The currently supported OCR models are:
| Model | Hugging Face Repository | Size |
|---|---|---|
nexora-ocr-v0.1-0.8b |
ArkAiLab-Adl/nexora-ocr-v0.1-0.8b |
0.8B |
nexora-ocr-v0.1-2b |
ArkAiLab-Adl/nexora-ocr-v0.1-2b |
2B |
The models are distributed separately from the Python package through the Hugging Face Hub.
Nexora handles model loading and inference through its internal model interface, keeping model weights separate from the Python distribution.
Nexora uses a modular architecture so different AI capabilities can be integrated through dedicated modules.
nexora/
├── src/
│ └── nexora/
│ ├── __init__.py
│ │
│ └── ocr/
│ ├── __init__.py
│ ├── ocr.py
│ ├── model.py
│ ├── processor.py
│ └── result.py
│
├── tests/
├── README.md
├── LICENSE
├── requirements.txt
└── pyproject.toml
Nexora currently relies on the following core libraries:
- PyTorch
- Transformers
- Hugging Face Hub
- Accelerate
- SafeTensors
- Pillow
- NumPy
Python 3.10 or newer is required.
Clone the repository:
git clone https://github.com/ArkDevelopmentLabs/nexora
cd nexoraCreate a virtual environment:
python -m venv .venvActivate it on Windows:
.\.venv\Scripts\Activate.ps1Install the development dependencies:
pip install -r requirements.txtInstall Nexora in editable mode:
pip install -e .Nexora is being developed as a broader AI toolkit.
Planned improvements include:
- Improved OCR inference
- Batch inference
- GPU and CPU optimization
- Additional model integrations
- Model management utilities
- Additional computer vision capabilities
- Additional machine learning capabilities
- Improved inference and deployment utilities
The API and implementation details may evolve as the project develops.
Nexora is licensed under the Apache License 2.0.
See the LICENSE file for the complete license text.
Nexora is developed by ArkDevLabs.
GitHub:
https://github.com/ArkDevelopmentLabs/nexora
PyPI:
https://pypi.org/project/nexora-ai/
Nexora is currently in alpha development.
The 0.1.x releases are intended for experimentation, development, and early testing. APIs and implementation details may change between releases.