Skip to content

Commit

Permalink
Merge pull request #693 from manikumarreddyu/apii
Browse files Browse the repository at this point in the history
ok
  • Loading branch information
manikumarreddyu authored Oct 27, 2024
2 parents c8687b8 + 545c9a3 commit 4689745
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 207 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/models/CropRecommendation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CropRecommendation = () => {

const handlePredictClick = (e) => {
e.preventDefault();
const url = "https://agro-kdxo.onrender.com/crop_predict";
const url = "https://agrotech-api.onrender.com/crop_predict";
// const url = "http://127.0.0.1:5000/crop_predict";
setIsloading(true);
const jsonData = JSON.stringify(formData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Component() {

const handlePredictClick = (e) => {
e.preventDefault()
const url = "https://crop-rotation-api.onrender.com/crop_recommendation"
const url = "https://agrotech-api.onrender.com/crop_rotation"
setIsLoading(true)

const numericData = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/models/Fertilizer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function Component() {
e.preventDefault();
// const url = "https://agro-ai-1.onrender.com/fertilizer_predict";
// https://agro-kdxo.onrender.com/
const url = "https://agro-kdxo.onrender.com/fertilizer_predict";
const url = "https://agrotech-api.onrender.com/fertilizer_predict";
// const url = "http://127.0.0.1:5000/fertilizer_predict";
setIsLoading(true);
const jsonData = JSON.stringify(formData);
Expand Down
198 changes: 0 additions & 198 deletions frontend/src/components/models/Irrigation.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/src/components/models/Prices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Prices = () => {
useEffect(() => {
const fetchData = async () => {
try {
const response = await fetch('https://agro-kdxo.onrender.com/price_predict');
const response = await fetch('https://agrotech-api.onrender.com/price_predict');
if (!response.ok) throw new Error('Network response was not ok');
const responseData = await response.json();
setReceivedData(responseData);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/models/Reports.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Reports = () => {
useEffect(() => {
const fetchData = async () => {
try {
const url = "https://agro-ai-1.onrender.com/commodity_predict";
const url = "https://agrotech-api.onrender.com/commodity_predict";
const response = await fetch(url, {
method: "POST",
headers: {
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/models/SoilQuality.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const SoilQuality = () => {

const handlePredictClick = (e) => {
e.preventDefault();
const url = "https://agro-kdxo.onrender.com/soil_quality_predict";
const url = "https://agrotech-api.onrender.com/soil_quality_predict";
// const url = "http://127.0.0.1:5000/soil_quality_predict";
setIsLoading(true);

Expand Down Expand Up @@ -617,4 +617,3 @@ const SoilQuality = () => {
};

export default SoilQuality;

2 changes: 1 addition & 1 deletion frontend/src/pages/ChatBot.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function ChatBot() {
}

try {
const response = await fetch('https://agrotech-chatbot.onrender.com/AgroTech-ChatBot', {
const response = await fetch('https://agrotech-api.onrender.com/chatbot', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ prompt: messageToSend }),
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Disease/DiseaseRecognition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const DiseaseRecognition = () => {

setLoading(true);
try {
const response = await axios.post('https://combined-disease-detection-api.onrender.com/predict', formData, {
const response = await axios.post('https://agrotech-api.onrender.com/disease_predict', formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
Expand Down

0 comments on commit 4689745

Please sign in to comment.