Spaces:
No application file
No application file
Download evals/.github/workflows/parse_yaml.py from successforce/agi_evals: direct link, hf CLI and curl.
- Browser
- Download file 309 Bytes
-
https://huggingface.co/spaces/successforce/agi_evals/resolve/main/evals/.github/workflows/parse_yaml.py
- Command line
-
hf download hf://spaces/successforce/agi_evals/evals/.github/workflows/parse_yaml.py
-
curl -L -o parse_yaml.py https://huggingface.co/spaces/successforce/agi_evals/resolve/main/evals/.github/workflows/parse_yaml.py
309 Bytes
| import sys | |
| import yaml | |
| def get_first_key(file_path): | |
| with open(file_path, 'r') as yaml_file: | |
| content = yaml.safe_load(yaml_file) | |
| first_key = next(iter(content)) | |
| return first_key | |
| if __name__ == "__main__": | |
| yaml_file_path = sys.argv[1] | |
| print(get_first_key(yaml_file_path)) | |