Skip to content

deepeshdm/CropFusionAI-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CropFusionAI Backend

This repo contains all the Backend services that support the CropFusionAI Frontend here.

It contains the following things :

  • Model Training Data
  • Model Training Notebooks
  • Trained ML models for Crop & Fertilizer Classification
  • Backend FastAPI services that exposes both models through REST API's.

🔥 API Docs 👉 here

Code Examples

Below are some code examples you can utilize to send post requests to different endpoints with different payloads to make the most out of the ML models.

1] Crop Recommendation API

import requests
url = "https://8080-797137136eb6451193a1f8c64a951490.patr.cloud/crop_recommend"
payload = { "array": [55,44,33,40,75,6.5,300] }
response = requests.post(url, json=payload)
print(response.json())

2] Fertilizer Recommendation API

import requests
url = "https://8080-797137136eb6451193a1f8c64a951490.patr.cloud/fertilizer_recommend"
payload = { "array": [33,56,30,88,91,12,"Sandy","Cotton"] }
response = requests.post(url, json=payload)
print(response.json())

Links to Resources

  • Crop Recommendation Dataset here
  • Fertilizer Recommendation Dataset here