Download example.py from MikeCVermeer/sensitive-niche-screening: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/MikeCVermeer/sensitive-niche-screening/resolve/main/example.py
- Command line
-
hf download hf://MikeCVermeer/sensitive-niche-screening/example.py
-
curl -L -o example.py https://huggingface.co/MikeCVermeer/sensitive-niche-screening/resolve/main/example.py
582 Bytes
| """Illustrate array shapes only; zero features are not research-compatible evidence.""" | |
| import numpy as np | |
| from niche_screen import load_model, score_pages, score_site | |
| model = load_model('.') | |
| vectors = np.ones((2, 1024), dtype='f') / np.sqrt(1024) | |
| a7_features = np.zeros((2, 9, 19), dtype='f') | |
| operator_features = np.zeros((2, 9, 16), dtype='f') | |
| print('Fictional projected inputs:', score_pages(model, vectors, a7_features)['commercial_score'].shape) | |
| print('Operator score shape:', score_site(model, vectors, a7_features, operator_features, [True, False])['operator_score'].shape) | |