Spaces:
Runtime error
Runtime error
Download scripts/generate_nutrient_data.py from sp103107/cannabiscal: direct link, hf CLI and curl.
- Browser
- Download file 755 Bytes
-
https://huggingface.co/spaces/sp103107/cannabiscal/resolve/main/scripts/generate_nutrient_data.py
- Command line
-
hf download hf://spaces/sp103107/cannabiscal/scripts/generate_nutrient_data.py
-
curl -L -o generate_nutrient_data.py https://huggingface.co/spaces/sp103107/cannabiscal/resolve/main/scripts/generate_nutrient_data.py
755 Bytes
| import yaml | |
| def generate_nutrient_yaml(output_path="nutrients.yaml"): | |
| nutrients = { | |
| "veg": { | |
| "1": {"Nitrogen": 0.2, "Phosphorus": 0.1, "Potassium": 0.2}, | |
| "2": {"Nitrogen": 0.25, "Phosphorus": 0.15, "Potassium": 0.25}, | |
| }, | |
| "flower": { | |
| "1": {"Nitrogen": 0.15, "Phosphorus": 0.25, "Potassium": 0.35}, | |
| }, | |
| } | |
| with open(output_path, "w") as file: | |
| yaml.dump(nutrients, file) | |
| def generate_remedies_yaml(output_path="remedies.yaml"): | |
| remedies = { | |
| "nitrogen_deficiency": {"Nitrogen": 0.5}, | |
| } | |
| with open(output_path, "w") as file: | |
| yaml.dump(remedies, file) | |
| generate_nutrient_yaml("nutrients.yaml") | |
| generate_remedies_yaml("remedies.yaml") | |