Instructions to use akshara-ns/doc-compass with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use akshara-ns/doc-compass with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="akshara-ns/doc-compass")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("akshara-ns/doc-compass", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download doccompass/paths.py from akshara-ns/doc-compass: direct link, hf CLI and curl.
- Browser
- Download file 1.21 kB
-
https://huggingface.co/akshara-ns/doc-compass/resolve/main/doccompass/paths.py
- Command line
-
hf download hf://akshara-ns/doc-compass/doccompass/paths.py
-
curl -L -o paths.py https://huggingface.co/akshara-ns/doc-compass/resolve/main/doccompass/paths.py
1.21 kB
| """Where local data lives. Everything under data/ except label and id files stays out of git.""" | |
| from pathlib import Path | |
| # absolute(), not resolve(): the Hugging Face cache stores files as symlinks, and following | |
| # them would point ROOT at the cache's blob folder instead of the folder holding checkpoints/. | |
| ROOT = Path(__file__).absolute().parents[1] | |
| PUBLIC = ROOT / "data" / "public" # downloaded and derived public data | |
| MANUAL = ROOT / "data" / "manual" # our pool and labels | |
| MODELS = ROOT / "checkpoints" | |
| MEDIQ_POSTS = PUBLIC / "mediq_posts.csv" | |
| PATIENT_COMMENTS = PUBLIC / "patient_comments.csv" | |
| POOL_IDS = MANUAL / "pool.ids.csv" # committed: which posts we label, and who labels them | |
| POOL = MANUAL / "pool.csv" # local only: the same posts with their text | |
| DRAFT_LABELS = MANUAL / "draft.labels.csv" # first-pass labels shown in the labelling tool | |
| ADJUDICATED = MANUAL / "adjudicated.labels.csv" # committed: our agreed label where the two of us disagreed | |
| GOLD = MANUAL / "gold.labels.csv" # committed: one label per post, with its split, written by scripts/merge_labels.py | |
| EMERGENCY_CASES = ROOT / "data" / "synthetic" / "emergency_cases.csv" # written by us to test the emergency check | |