Spaces:
Runtime error
Runtime error
Download src/preprocessing.py from BIASLab/sars-cov-2-classification-fcgr: direct link, hf CLI and curl.
- Browser
- Download file 444 Bytes
-
https://huggingface.co/spaces/BIASLab/sars-cov-2-classification-fcgr/resolve/main/src/preprocessing.py
- Command line
-
hf download hf://spaces/BIASLab/sars-cov-2-classification-fcgr/src/preprocessing.py
-
curl -L -o preprocessing.py https://huggingface.co/spaces/BIASLab/sars-cov-2-classification-fcgr/resolve/main/src/preprocessing.py
444 Bytes
| """All functions that can be applied as preprocessing""" | |
| from .pipeline import ( | |
| register_in_pipeline, # decorator to make available a function to use with Pipeline class | |
| Pipeline, | |
| ) | |
| def divide_by_max(npy,): | |
| "The input npy divided by his maximum value" | |
| return npy / npy.max() | |
| def divide_by_sum(npy,): | |
| "The input npy divided by the sum of their values" | |
| return npy / npy.sum() |