Spaces:
Sleeping
Sleeping
Download processing/normalizer.py from Jash-K/Dataset_Recommender: direct link, hf CLI and curl.
- Browser
- Download file 664 Bytes
-
https://huggingface.co/spaces/Jash-K/Dataset_Recommender/resolve/main/processing/normalizer.py
- Command line
-
hf download hf://spaces/Jash-K/Dataset_Recommender/processing/normalizer.py
-
curl -L -o normalizer.py https://huggingface.co/spaces/Jash-K/Dataset_Recommender/resolve/main/processing/normalizer.py
664 Bytes
| def normalize_results(raw_results: list[dict]) -> list[dict]: | |
| normalized = [] | |
| for item in raw_results: | |
| normalized.append({ | |
| 'source': str(item.get('source', 'Unknown')), | |
| 'name': str(item.get('name', 'Untitled Dataset')), | |
| 'description': str(item.get('description', '')), | |
| 'url': str(item.get('url', '')), | |
| 'license': str(item.get('license', 'unknown')), | |
| 'last_updated': str(item.get('last_updated', '')), | |
| 'format': str(item.get('format', 'unknown')), | |
| 'size_estimate': str(item.get('size_estimate', 'unknown')), | |
| }) | |
| return normalized |