Instructions to use CaseLoop/rights-navigator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CaseLoop/rights-navigator with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("CaseLoop/rights-navigator") model = AutoModelForSeq2SeqLM.from_pretrained("CaseLoop/rights-navigator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download pdf_simplifier_module/README.md from CaseLoop/rights-navigator: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/CaseLoop/rights-navigator/resolve/main/pdf_simplifier_module/README.md
- Command line
-
hf download hf://CaseLoop/rights-navigator/pdf_simplifier_module/README.md
-
curl -L -o README.md https://huggingface.co/CaseLoop/rights-navigator/resolve/main/pdf_simplifier_module/README.md
620 Bytes
Requirements.txt -> List of Python dependencies
data/val_pairs.json and data/train_pairs.json -> Training dataset (JSON array)
src/pdf_extractor.py -> Reads input PDFs, strips OCR artifacts and boilerplate footers, and splits the content into digestible chunks.
src/train.py -> Loads train_pairs.json, tokenizes the data, fine-tunes google/flan-t5-base, and saves the weights to models/saved_simplifier/
src/inference.py -> Takes a PDF file path, extracts text via pdf_extractor.py, passes it through the fine-tuned model, and returns plain-English text.
main.py -> Entry point to test the full pipeline