Spaces:
Runtime error
Runtime error
Download ml_models/evaluate_ensemble.py from KaustavMP/NetWokie-AI: direct link, hf CLI and curl.
- Browser
- Download file 726 Bytes
-
https://huggingface.co/spaces/KaustavMP/NetWokie-AI/resolve/main/ml_models/evaluate_ensemble.py
- Command line
-
hf download hf://spaces/KaustavMP/NetWokie-AI/ml_models/evaluate_ensemble.py
-
curl -L -o evaluate_ensemble.py https://huggingface.co/spaces/KaustavMP/NetWokie-AI/resolve/main/ml_models/evaluate_ensemble.py
726 Bytes
| import json | |
| import os | |
| import sys | |
| BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| if BASE_DIR not in sys.path: | |
| sys.path.insert(0, BASE_DIR) | |
| def main(): | |
| artifact_dir = os.path.join(os.path.dirname(__file__), "ensemble_artifacts") | |
| metadata_path = os.path.join(artifact_dir, "metadata.json") | |
| if not os.path.exists(metadata_path): | |
| print("No trained ensemble artifacts found. Run ml_models/train_ensemble.py first.") | |
| return | |
| with open(metadata_path, "r", encoding="utf-8") as handle: | |
| metadata = json.load(handle) | |
| print("Loaded ensemble metadata.") | |
| print(json.dumps(metadata.get("reports", {}), indent=2)[:6000]) | |
| if __name__ == "__main__": | |
| main() | |