Spaces:
Sleeping
Sleeping
Download utils.py from OrangeLabs/v5: direct link, hf CLI and curl.
- Browser
- Download file 453 Bytes
-
https://huggingface.co/spaces/OrangeLabs/v5/resolve/main/utils.py
- Command line
-
hf download hf://spaces/OrangeLabs/v5/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/OrangeLabs/v5/resolve/main/utils.py
453 Bytes
| def read_file_to_dic(file_path): | |
| dic = {} | |
| with open(file_path, 'r') as file: | |
| for line in file: | |
| # Skip comments and empty lines | |
| if line.strip() and not line.startswith('//'): | |
| key, value = line.strip().split('=', 1) | |
| values = value.split(';') | |
| dic[key] = values | |
| return dic | |
| def read_file(file_path): | |
| with open(file_path, 'r') as file: | |
| return file.read() |