Feature Extraction
Transformers
Safetensors
PyTorch
English
eden
text-enhancement
grammar-correction
text-rewriting
encoder-decoder
transformer
custom_code
Instructions to use Rybib/EDEN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rybib/EDEN with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Rybib/EDEN", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Rybib/EDEN", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| """Use EDEN through the local training engine instead of Transformers. | |
| This loads a checkpoint produced by the EDEN trainer (a .pt file) and runs the | |
| same enhancement pipeline used during development. Set EDEN_HOME so the engine | |
| can find the tokenizer under $EDEN_HOME/eden_system/data/tokenizer.json. | |
| Run from the repository root: | |
| EDEN_HOME=/path/to/workspace python examples/use_locally.py /path/to/best.pt | |
| """ | |
| import os | |
| import sys | |
| from pathlib import Path | |
| # Make the repository root importable when running this script directly. | |
| sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from eden import enhance_text, load_model_for_inference | |
| checkpoint = Path(sys.argv[1]) if len(sys.argv) > 1 else None | |
| model, tokenizer, config, device = load_model_for_inference(checkpoint, force_cpu=True) | |
| for rough in [ | |
| "i relly wnt this sentance to sound more profesional", | |
| "their are alot of reasons why this dont work proper", | |
| ]: | |
| print("rough :", rough) | |
| print("polished:", enhance_text(rough, model, tokenizer, config, device)) | |
| print() | |