Cloudsurfer48902
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -9,14 +9,102 @@ tags:
|
|
9 |
- unsloth
|
10 |
- llama
|
11 |
- gguf
|
|
|
|
|
12 |
---
|
|
|
13 |
|
14 |
-
|
15 |
|
|
|
16 |
- **Developed by:** Cloudsurfer48902
|
|
|
|
|
|
|
17 |
- **License:** apache-2.0
|
18 |
-
- **Finetuned
|
19 |
|
20 |
-
|
|
|
21 |
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
- unsloth
|
10 |
- llama
|
11 |
- gguf
|
12 |
+
- agriculture
|
13 |
+
- kenya
|
14 |
---
|
15 |
+
# Agronexus: Agricultural Recommendation Model for Kenya
|
16 |
|
17 |
+
This model, Agronexus, is specialized in providing agricultural recommendations for Kenya. It was developed by Cloudsurfer48902 and fine-tuned from the unsloth/llama-2-7b-bnb-4bit base model.
|
18 |
|
19 |
+
## Model Details
|
20 |
- **Developed by:** Cloudsurfer48902
|
21 |
+
- **Base Model:** unsloth/llama-2-7b-bnb-4bit
|
22 |
+
- **Model Type:** Causal Language Model
|
23 |
+
- **Language:** English
|
24 |
- **License:** apache-2.0
|
25 |
+
- **Finetuned with:** [Unsloth](https://github.com/unslothai/unsloth) and Hugging Face's TRL library
|
26 |
|
27 |
+
## Intended Use
|
28 |
+
This model is designed to provide agricultural recommendations for Kenya based on specific weather and soil conditions. It's intended for use by farmers, agricultural advisors, and researchers working in the Kenyan agricultural sector.
|
29 |
|
30 |
+
## Training Data
|
31 |
+
The model was trained on a dataset containing detailed agricultural scenarios in Kenya, including weather conditions, soil properties, and corresponding crop recommendations.
|
32 |
+
|
33 |
+
## Input Format
|
34 |
+
The model expects input in the following format:
|
35 |
+
|
36 |
+
```
|
37 |
+
You are an expert agricultural advisor specializing in Kenyan agriculture. It is [current date]. Given the following weather and soil conditions for [location], Kenya, provide a recommendation for one (1) distinct crop suitable for growing. The location has a [climate type] climate.
|
38 |
+
|
39 |
+
Weather:
|
40 |
+
- Current Description: [weather description]
|
41 |
+
- Current Temperature: [temperature]°C
|
42 |
+
- Average Annual Temperature (5-year): [average temp]°C
|
43 |
+
- Average Annual Precipitation (5-year): [average precipitation] mm
|
44 |
+
- 14-Day Forecast:
|
45 |
+
- Average Max Temperature: [max temp]°C
|
46 |
+
- Average Min Temperature: [min temp]°C
|
47 |
+
- Total Precipitation: [precipitation] mm
|
48 |
+
|
49 |
+
Soil Properties:
|
50 |
+
- clay: [percentage]%
|
51 |
+
- sand: [percentage]%
|
52 |
+
- silt: [percentage]%
|
53 |
+
- phh2o: [pH level]
|
54 |
+
- cec: [CEC value] cmol/kg
|
55 |
+
|
56 |
+
Consider the specific Kenyan climate, local soil composition, and pH level when selecting the crop and providing advice. Ensure the recommendation is tailored to the given conditions. Output the recommendation in the following JSON format ONLY!
|
57 |
+
```
|
58 |
+
|
59 |
+
## Output Format
|
60 |
+
The model will return a JSON object with the following structure:
|
61 |
+
|
62 |
+
```json
|
63 |
+
{
|
64 |
+
"Crop": "Recommended crop name",
|
65 |
+
"Planting Date": "Specific months based on Kenyan growing seasons",
|
66 |
+
"Harvesting Time": "Estimated number of months after planting",
|
67 |
+
"Farm Inputs": [
|
68 |
+
{"Type": "Input type", "Description": "Detailed description of input"}
|
69 |
+
],
|
70 |
+
"Best Care Methods": "Detailed care tips tailored to Kenyan weather patterns",
|
71 |
+
"Cost Cutting Measures": "Detailed cost-saving measures relevant to Kenyan agriculture",
|
72 |
+
"Expected Yield": "Estimated yield per hectare",
|
73 |
+
"Market Potential": "Brief overview of market demand and potential profit",
|
74 |
+
"Environmental Impact": "Brief description of the crop's environmental impact",
|
75 |
+
"Crop Rotation Suggestions": "Suggestions for crop rotation to maintain soil health",
|
76 |
+
"Pest and Disease Management": "Common pests/diseases and management strategies",
|
77 |
+
"Water Management": "Irrigation requirements and water conservation techniques",
|
78 |
+
"Soil Management": "Techniques to maintain or improve soil quality for this crop"
|
79 |
+
}
|
80 |
+
```
|
81 |
+
|
82 |
+
## Limitations
|
83 |
+
- The model's knowledge is based on its training data and may not reflect very recent changes in agricultural practices or climate conditions in Kenya.
|
84 |
+
- Recommendations should be validated by local agricultural experts before implementation.
|
85 |
+
- The model may not account for all possible local variations in soil and microclimate conditions.
|
86 |
+
|
87 |
+
## Ethical Considerations
|
88 |
+
- Users should be aware that the model's recommendations are based on general patterns and may not be suitable for all specific local conditions.
|
89 |
+
- The model's output should be used as a starting point for agricultural planning, not as a definitive guide.
|
90 |
+
- Care should be taken to ensure that the use of this model does not exacerbate existing inequalities in access to agricultural information and resources.
|
91 |
+
|
92 |
+
## How to Use
|
93 |
+
To use this model with the Hugging Face Transformers library:
|
94 |
+
|
95 |
+
```python
|
96 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
97 |
+
|
98 |
+
model_name = "Cloudsurfer48902/agronexus"
|
99 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
100 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
101 |
+
|
102 |
+
prompt = "You are an expert agricultural advisor specializing in Kenyan agriculture. It is 15 August 2024. Given the following weather and soil conditions for Nairobi, Kenya, provide a recommendation for one (1) distinct crop suitable for growing. The location has a semi-arid climate. Weather: - Current Description: partly cloudy - Current Temperature: 22°C - Average Annual Temperature (5-year): 19°C - Average Annual Precipitation (5-year): 850 mm - 14-Day Forecast: - Average Max Temperature: 25°C - Average Min Temperature: 14°C - Total Precipitation: 20 mm Soil Properties: - clay: 35% - sand: 40% - silt: 25% - phh2o: 6.2 - cec: 18 cmol/kg Consider the specific Kenyan climate, local soil composition, and pH level when selecting the crop and providing advice. Ensure the recommendation is tailored to the given conditions. Output the recommendation in the following JSON format ONLY!"
|
103 |
+
|
104 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
105 |
+
outputs = model.generate(**inputs, max_length=1000, temperature=0.7)
|
106 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
107 |
+
print(response)
|
108 |
+
```
|
109 |
+
|
110 |
+
Note: Adjust the `max_length` and `temperature` parameters as needed for your specific use case.
|