NitinBot002 commited on
Commit
46646b3
·
verified ·
1 Parent(s): f913688

Upload 47 files

Browse files
Files changed (48) hide show
  1. .gitattributes +4 -0
  2. .github/workflows/workflow_1.yml +78 -0
  3. .github/workflows/workflow_2.yml +78 -0
  4. AgriGo/app.py +71 -0
  5. AgriGo/dataset/Crop_recommendation.csv +0 -0
  6. AgriGo/dataset/Fertilizer Prediction.csv +100 -0
  7. AgriGo/functions.py +107 -0
  8. AgriGo/models/DL_models/apple_model.h5 +3 -0
  9. AgriGo/models/DL_models/cherry_model.h5 +3 -0
  10. AgriGo/models/DL_models/corn_model.h5 +3 -0
  11. AgriGo/models/DL_models/grape_model.h5 +3 -0
  12. AgriGo/models/DL_models/patato_model.h5 +3 -0
  13. AgriGo/models/DL_models/peach_model.h5 +3 -0
  14. AgriGo/models/DL_models/pepper_model.h5 +3 -0
  15. AgriGo/models/DL_models/strawberry_model.h5 +3 -0
  16. AgriGo/models/DL_models/tomato_model.h5 +3 -0
  17. AgriGo/models/ML_models/crop_model.pkl +3 -0
  18. AgriGo/models/ML_models/crop_scaler.pkl +3 -0
  19. AgriGo/models/ML_models/fertilizer_model.pkl +3 -0
  20. AgriGo/models/ML_models/fertilizer_scaler.pkl +3 -0
  21. AgriGo/static/css/main.css +284 -0
  22. AgriGo/static/images/bg.jpg +3 -0
  23. AgriGo/static/images/features-bg.png +3 -0
  24. AgriGo/static/images/footer-bg.jpg +3 -0
  25. AgriGo/static/images/service-1.jpg +0 -0
  26. AgriGo/static/images/service-2.jpg +0 -0
  27. AgriGo/static/images/service-3.jpg +0 -0
  28. AgriGo/static/images/upload-img.jpg +3 -0
  29. AgriGo/static/images/upload.jpg +0 -0
  30. AgriGo/static/js/my.js +9 -0
  31. AgriGo/templates/crop-disease.html +66 -0
  32. AgriGo/templates/crop-recommend.html +87 -0
  33. AgriGo/templates/disease-prediction-result.html +27 -0
  34. AgriGo/templates/fertilizer-recommend.html +100 -0
  35. AgriGo/templates/index.html +183 -0
  36. AgriGo/templates/recommend_result.html +23 -0
  37. AgriGo/uploads/00a55069-3fa3-405b-8d87-4d3408a6ed98___RS_NLB_3645.JPG +0 -0
  38. AgriGo/uploads/0a283423-3a6d-43a4-92e5-267c8153ca45___FREC_Pwd.M_4921.JPG +0 -0
  39. AgriGo/uploads/0ab4bd76-19fb-4372-9ac0-9582843c4008___FREC_Pwd.M_0263.JPG +0 -0
  40. AgriGo/uploads/0b37761a-de32-47ee-a3a4-e138b97ef542___JR_FrgE.S_2908.JPG +0 -0
  41. AgriGo/uploads/0b4fb93e-1a74-42ae-9227-18d900c04bd7___RS_NLB_3670.JPG +0 -0
  42. AgriGo/uploads/0b7b9ff9-4324-4ee0-a77c-6bf4b9331c6d___JR_HL_4110.JPG +0 -0
  43. AgriGo/uploads/0c4e75b2-e4aa-437e-815c-636271d66bec___JR_B.Spot_3244.JPG +0 -0
  44. Dockerfile +26 -0
  45. LICENSE +21 -0
  46. Pipefile +63 -0
  47. package.json +5 -0
  48. requirements.txt +50 -0
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ AgriGo/static/images/bg.jpg filter=lfs diff=lfs merge=lfs -text
37
+ AgriGo/static/images/features-bg.png filter=lfs diff=lfs merge=lfs -text
38
+ AgriGo/static/images/footer-bg.jpg filter=lfs diff=lfs merge=lfs -text
39
+ AgriGo/static/images/upload-img.jpg filter=lfs diff=lfs merge=lfs -text
.github/workflows/workflow_1.yml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Persistent NPort Tunnel - Workflow 1
2
+
3
+ on:
4
+ workflow_dispatch: # मैन्युअल रूप से स्टार्ट किया जा सकता है
5
+
6
+ jobs:
7
+ deploy:
8
+ runs-on: ubuntu-latest
9
+ timeout-minutes: 355 # यह 6 घंटे तक चलेगा
10
+
11
+ steps:
12
+ - name: Clone repository
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Build and Run Docker Container
16
+ run: |
17
+ docker build -t myapp .
18
+ docker run -d -p 5000:5000 --name myapp_container myapp
19
+ sleep 10
20
+
21
+ - name: Install Dependencies
22
+ run: |
23
+ sudo apt update && sudo apt install -y openssh-client jq curl
24
+
25
+ - name: Generate Random Subdomain
26
+ run: |
27
+ SUBDOMAIN=$(openssl rand -hex 4)
28
+ echo "SUBDOMAIN=$SUBDOMAIN" >> $GITHUB_ENV
29
+
30
+ - name: Start NPort Tunnel and Save URL
31
+ run: |
32
+ echo "Starting NPort Tunnel with subdomain: $SUBDOMAIN"
33
+ # Add cloudflare gpg key
34
+ sudo mkdir -p --mode=0755 /usr/share/keyrings
35
+ curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
36
+
37
+ # Add this repo to your apt repositories
38
+ echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list
39
+
40
+ # install cloudflared
41
+ sudo apt-get update && sudo apt-get install cloudflared
42
+
43
+ sleep 5
44
+
45
+ sudo cloudflared service install ${{ secrets.CF_KEY }}
46
+
47
+ sleep 15
48
+
49
+ # टनल URL सेट करें
50
+ TUNNEL_URL="https://agrigo.easyfarms.in"
51
+ echo "Generated Tunnel URL: $TUNNEL_URL"
52
+
53
+ # URL को `instance.json` में सेव करें
54
+ echo "{ \"tunnel_url\": \"$TUNNEL_URL\" }" > instance.json
55
+
56
+ - name: Commit and Push Tunnel URL
57
+ run: |
58
+ git diff --quiet && echo "No changes to commit" || (
59
+ git config --global user.email "github-actions@github.com"
60
+ git config --global user.name "GitHub Actions"
61
+ git add instance.json
62
+ git commit -m "Updated tunnel URL"
63
+ git push
64
+ )
65
+
66
+ - name: Trigger Workflow 2 After 5 Hours 40 Minutes
67
+ run: |
68
+ echo "Waiting for 5 hours 40 minutes before triggering workflow_2..."
69
+ sleep 20400 # 5 घंटे 40 मिनट (5.67 × 60 × 60 सेकंड)
70
+
71
+ echo "Triggering workflow_2 now..."
72
+ curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
73
+ -H "Accept: application/vnd.github.v3+json" \
74
+ https://api.github.com/repos/${{ github.repository }}/actions/workflows/workflow_2.yml/dispatches \
75
+ -d '{"ref": "main"}'
76
+
77
+ - name: Keep Workflow Running for 6 Hours
78
+ run: tail -f /dev/null # इसे 6 घंटे तक चालू रखेगा
.github/workflows/workflow_2.yml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Persistent NPort Tunnel - Workflow 2
2
+
3
+ on:
4
+ workflow_dispatch: # पहला वर्कफ़्लो इसे ट्रिगर करेगा
5
+
6
+ jobs:
7
+ deploy:
8
+ runs-on: ubuntu-latest
9
+ timeout-minutes: 355 # यह भी 6 घंटे तक चलेगा
10
+
11
+ steps:
12
+ - name: Clone repository
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Build and Run Docker Container
16
+ run: |
17
+ docker build -t myapp .
18
+ docker run -d -p 5000:5000 --name myapp_container myapp
19
+ sleep 10
20
+
21
+ - name: Install Dependencies
22
+ run: |
23
+ sudo apt update && sudo apt install -y openssh-client jq curl
24
+
25
+ - name: Generate Random Subdomain
26
+ run: |
27
+ SUBDOMAIN=$(openssl rand -hex 4)
28
+ echo "SUBDOMAIN=$SUBDOMAIN" >> $GITHUB_ENV
29
+
30
+ - name: Start NPort Tunnel and Save URL
31
+ run: |
32
+ echo "Starting NPort Tunnel with subdomain: $SUBDOMAIN"
33
+ # Add cloudflare gpg key
34
+ sudo mkdir -p --mode=0755 /usr/share/keyrings
35
+ curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
36
+
37
+ # Add this repo to your apt repositories
38
+ echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared any main' | sudo tee /etc/apt/sources.list.d/cloudflared.list
39
+
40
+ # install cloudflared
41
+ sudo apt-get update && sudo apt-get install cloudflared
42
+
43
+ sleep 5
44
+
45
+ sudo cloudflared service install ${{ secrets.CF_KEY }}
46
+
47
+ sleep 10
48
+
49
+ # टनल URL सेट करें
50
+ TUNNEL_URL="https://$SUBDOMAIN.nport.link"
51
+ echo "Generated Tunnel URL: $TUNNEL_URL"
52
+
53
+ # URL को `instance.json` में सेव करें
54
+ echo "{ \"tunnel_url\": \"$TUNNEL_URL\" }" > instance.json
55
+
56
+ - name: Commit and Push Tunnel URL
57
+ run: |
58
+ git diff --quiet && echo "No changes to commit" || (
59
+ git config --global user.email "github-actions@github.com"
60
+ git config --global user.name "GitHub Actions"
61
+ git add instance.json
62
+ git commit -m "Updated tunnel URL"
63
+ git push
64
+ )
65
+
66
+ - name: Trigger Workflow 1 After 5 Hours 40 Minutes
67
+ run: |
68
+ echo "Waiting for 5 hours 40 minutes before triggering workflow_1..."
69
+ sleep 20400 # 5 घंटे 40 मिनट (5.67 × 60 × 60 सेकंड)
70
+
71
+ echo "Triggering workflow_1 now..."
72
+ curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
73
+ -H "Accept: application/vnd.github.v3+json" \
74
+ https://api.github.com/repos/${{ github.repository }}/actions/workflows/workflow_1.yml/dispatches \
75
+ -d '{"ref": "main"}'
76
+
77
+ - name: Keep Workflow Running for 6 Hours
78
+ run: tail -f /dev/null # इसे 6 घंटे तक चालू रखेगा
AgriGo/app.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, render_template, request, send_from_directory
2
+ import random, os
3
+ from werkzeug.utils import secure_filename
4
+ from functions import img_predict, get_diseases_classes, get_crop_recommendation, get_fertilizer_recommendation, soil_types, Crop_types, crop_list
5
+
6
+
7
+ app = Flask(__name__)
8
+ random.seed(0)
9
+ app.config['SECRET_KEY'] = os.urandom(24)
10
+
11
+ UPLOAD_FOLDER = 'uploads'
12
+ STATIC_FOLDER = 'static'
13
+
14
+ dir_path = os.path.dirname(os.path.realpath(__file__))
15
+
16
+ @app.route('/', methods=['GET', 'POST'])
17
+ def index():
18
+ return render_template('index.html')
19
+
20
+ @app.route('/crop-recommendation', methods=['GET', 'POST'])
21
+ def crop_recommendation():
22
+ if request.method == "POST":
23
+ to_predict_list = request.form.to_dict()
24
+ to_predict_list = list(to_predict_list.values())
25
+ to_predict_list = list(map(float, to_predict_list))
26
+ result = get_crop_recommendation(to_predict_list)
27
+ return render_template("recommend_result.html", result=result)
28
+ else:
29
+ return render_template('crop-recommend.html')
30
+
31
+ @app.route('/fertilizer-recommendation', methods=['GET', 'POST'])
32
+ def fertilizer_recommendation():
33
+ if request.method == "POST":
34
+ to_predict_list = request.form.to_dict()
35
+ to_predict_list = list(to_predict_list.values())
36
+ to_predict_list = list(map(float, to_predict_list))
37
+ result = get_fertilizer_recommendation(
38
+ num_features=to_predict_list[:-2],
39
+ cat_features=to_predict_list[-2:]
40
+ )
41
+ return render_template("recommend_result.html", result=result)
42
+ else:
43
+ return render_template(
44
+ 'fertilizer-recommend.html',
45
+ soil_types=enumerate(soil_types),
46
+ crop_types=enumerate(Crop_types)
47
+ )
48
+
49
+
50
+ @app.route('/crop-disease', methods=['POST','GET'])
51
+ def find_crop_disease():
52
+ if request.method=="GET":
53
+ return render_template('crop-disease.html', crops=crop_list)
54
+ else:
55
+ file = request.files["file"]
56
+ crop = request.form["crop"]
57
+
58
+ basepath = os.path.dirname(__file__)
59
+ file_path = os.path.join(basepath,'uploads', secure_filename(file.filename))
60
+ file.save(file_path)
61
+ prediction = img_predict(file_path, crop)
62
+ result = get_diseases_classes(crop, prediction)
63
+
64
+ return render_template('disease-prediction-result.html', image_file_name=file.filename, result=result)
65
+
66
+ @app.route('/uploads/<filename>')
67
+ def send_file(filename):
68
+ return send_from_directory(UPLOAD_FOLDER, filename)
69
+
70
+ if __name__ == '__main__':
71
+ app.run(port=7860, debug=True)
AgriGo/dataset/Crop_recommendation.csv ADDED
The diff for this file is too large to render. See raw diff
 
AgriGo/dataset/Fertilizer Prediction.csv ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Temparature,Humidity ,Moisture,Soil Type,Crop Type,Nitrogen,Potassium,Phosphorous,Fertilizer Name
2
+ 26,52,38,Sandy,Maize,37,0,0,Urea
3
+ 29,52,45,Loamy,Sugarcane,12,0,36,DAP
4
+ 34,65,62,Black,Cotton,7,9,30,14-35-14
5
+ 32,62,34,Red,Tobacco,22,0,20,28-28
6
+ 28,54,46,Clayey,Paddy,35,0,0,Urea
7
+ 26,52,35,Sandy,Barley,12,10,13,17-17-17
8
+ 25,50,64,Red,Cotton,9,0,10,20-20
9
+ 33,64,50,Loamy,Wheat,41,0,0,Urea
10
+ 30,60,42,Sandy,Millets,21,0,18,28-28
11
+ 29,58,33,Black,Oil seeds,9,7,30,14-35-14
12
+ 27,54,28,Clayey,Pulses,13,0,40,DAP
13
+ 31,62,48,Sandy,Maize,14,15,12,17-17-17
14
+ 25,50,65,Loamy,Cotton,36,0,0,Urea
15
+ 32,62,41,Clayey,Paddy,24,0,22,28-28
16
+ 26,52,31,Red,Ground Nuts,14,0,41,DAP
17
+ 31,62,49,Black,Sugarcane,10,13,14,17-17-17
18
+ 33,64,34,Clayey,Pulses,38,0,0,Urea
19
+ 25,50,39,Sandy,Barley,21,0,19,28-28
20
+ 28,54,65,Black,Cotton,39,0,0,Urea
21
+ 29,58,52,Loamy,Wheat,13,0,36,DAP
22
+ 30,60,44,Sandy,Millets,10,0,9,20-20
23
+ 34,65,53,Loamy,Sugarcane,12,14,12,17-17-17
24
+ 35,68,33,Red,Tobacco,11,0,37,DAP
25
+ 28,54,37,Black,Millets,36,0,0,Urea
26
+ 33,64,39,Clayey,Paddy,13,0,10,20-20
27
+ 26,52,44,Sandy,Maize,23,0,20,28-28
28
+ 30,60,63,Red,Cotton,9,9,29,14-35-14
29
+ 32,62,30,Loamy,Sugarcane,38,0,0,Urea
30
+ 37,70,32,Black,Oil seeds,12,0,39,DAP
31
+ 26,52,36,Clayey,Pulses,14,0,13,20-20
32
+ 29,58,40,Red,Ground Nuts,24,0,23,28-28
33
+ 30,60,27,Loamy,Sugarcane,12,0,40,DAP
34
+ 34,65,38,Clayey,Paddy,39,0,0,Urea
35
+ 36,68,38,Sandy,Barley,7,9,30,14-35-14
36
+ 26,52,48,Loamy,Wheat,23,0,19,28-28
37
+ 28,54,35,Black,Millets,41,0,0,Urea
38
+ 30,60,61,Loamy,Cotton,8,10,31,14-35-14
39
+ 37,70,37,Clayey,Paddy,12,0,41,DAP
40
+ 25,50,26,Red,Ground Nuts,15,14,11,17-17-17
41
+ 29,58,34,Sandy,Millets,15,0,37,DAP
42
+ 27,54,30,Clayey,Pulses,13,0,13,20-20
43
+ 30,60,58,Loamy,Sugarcane,10,7,32,14-35-14
44
+ 32,62,34,Red,Tobacco,22,0,24,28-28
45
+ 34,65,60,Black,Sugarcane,35,0,0,Urea
46
+ 35,67,42,Sandy,Barley,10,0,35,DAP
47
+ 38,70,48,Loamy,Wheat,8,8,28,14-35-14
48
+ 26,52,32,Black,Oil seeds,12,0,8,20-20
49
+ 29,58,43,Clayey,Paddy,24,0,18,28-28
50
+ 30,60,29,Red,Ground Nuts,41,0,0,Urea
51
+ 33,64,51,Sandy,Maize,5,9,29,14-35-14
52
+ 34,65,31,Red,Tobacco,23,0,21,28-28
53
+ 36,68,33,Black,Oil seeds,13,0,14,20-20
54
+ 28,54,38,Clayey,Pulses,40,0,0,Urea
55
+ 30,60,47,Sandy,Barley,12,0,42,DAP
56
+ 31,62,63,Red,Cotton,11,12,15,17-17-17
57
+ 27,53,43,Black,Millets,23,0,24,28-28
58
+ 34,65,54,Loamy,Wheat,38,0,0,Urea
59
+ 29,58,37,Sandy,Millets,8,0,15,20-20
60
+ 25,50,56,Loamy,Sugarcane,11,13,15,17-17-17
61
+ 32,62,34,Red,Ground Nuts,15,0,37,DAP
62
+ 28,54,41,Clayey,Paddy,36,0,0,Urea
63
+ 30,60,49,Loamy,Wheat,13,0,9,20-20
64
+ 34,65,64,Black,Cotton,24,0,20,28-28
65
+ 28,54,47,Sandy,Barley,5,18,15,10-26-26
66
+ 27,53,35,Black,Oil seeds,37,0,0,Urea
67
+ 36,68,62,Red,Cotton,15,0,40,DAP
68
+ 34,65,57,Black,Sugarcane,9,0,13,20-20
69
+ 29,58,55,Loamy,Sugarcane,8,8,33,14-35-14
70
+ 25,50,40,Clayey,Pulses,6,19,16,10-26-26
71
+ 30,60,38,Sandy,Millets,10,0,14,20-20
72
+ 26,52,39,Clayey,Pulses,21,0,23,28-28
73
+ 31,62,32,Red,Tobacco,39,0,0,Urea
74
+ 34,65,48,Loamy,Wheat,23,0,19,28-28
75
+ 27,53,34,Black,Oil seeds,42,0,0,Urea
76
+ 33,64,31,Red,Ground Nuts,13,0,39,DAP
77
+ 29,58,42,Clayey,Paddy,9,10,22,14-35-14
78
+ 30,60,47,Sandy,Maize,22,0,21,28-28
79
+ 27,53,59,Loamy,Sugarcane,10,0,15,20-20
80
+ 26,52,36,Clayey,Pulses,7,16,20,10-26-26
81
+ 34,65,63,Red,Cotton,14,0,38,DAP
82
+ 28,54,43,Clayey,Paddy,10,8,29,14-35-14
83
+ 30,60,40,Sandy,Millets,41,0,0,Urea
84
+ 29,58,65,Black,Cotton,14,0,35,DAP
85
+ 26,52,59,Loamy,Sugarcane,11,0,9,20-20
86
+ 31,62,44,Sandy,Barley,21,0,28,28-28
87
+ 35,67,28,Clayey,Pulses,8,7,31,14-35-14
88
+ 29,58,30,Red,Tobacco,13,17,16,10-26-26
89
+ 27,53,30,Black,Millets,35,0,0,Urea
90
+ 36,68,50,Loamy,Wheat,12,18,19,10-26-26
91
+ 29,58,61,Loamy,Cotton,11,0,38,DAP
92
+ 30,60,26,Black,Oil seeds,8,9,30,14-35-14
93
+ 34,65,45,Clayey,Paddy,6,19,21,10-26-26
94
+ 36,68,41,Red,Ground Nuts,41,0,0,Urea
95
+ 28,54,25,Sandy,Maize,9,10,30,14-35-14
96
+ 25,50,32,Clayey,Pulses,24,0,19,28-28
97
+ 30,60,27,Red,Tobacco,4,17,17,10-26-26
98
+ 38,72,51,Loamy,Wheat,39,0,0,Urea
99
+ 36,60,43,Sandy,Millets,15,0,41,DAP
100
+ 29,58,57,Black,Sugarcane,12,0,10,20-20
AgriGo/functions.py ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import pickle
3
+ import numpy as np
4
+ from tensorflow.keras.preprocessing.image import load_img
5
+ from tensorflow.keras.models import load_model
6
+
7
+ BASE_DIR = os.path.abspath(os.path.dirname(__file__))
8
+
9
+ def get_model(path):
10
+ model = load_model(path, compile=False)
11
+ return model
12
+
13
+ def img_predict(path, crop):
14
+ data = load_img(path, target_size=(224, 224, 3))
15
+ data = np.asarray(data).reshape((-1, 224, 224, 3))
16
+ data = data * 1.0 / 255
17
+ model = get_model(os.path.join(BASE_DIR, 'models', 'DL_models', f'{crop}_model.h5'))
18
+ if len(crop_diseases_classes[crop]) > 2:
19
+ predicted = np.argmax(model.predict(data)[0])
20
+ else:
21
+ p = model.predict(data)[0]
22
+ predicted = int(np.round(p)[0])
23
+ return predicted
24
+
25
+ def get_diseases_classes(crop, prediction):
26
+ crop_classes = crop_diseases_classes[crop]
27
+ return crop_classes[prediction][1].replace("_", " ")
28
+
29
+ def get_crop_recommendation(item):
30
+ scaler_path = os.path.join(BASE_DIR, 'models', 'ML_models', 'crop_scaler.pkl')
31
+ model_path = os.path.join(BASE_DIR, 'models', 'ML_models', 'crop_model.pkl')
32
+
33
+ with open(scaler_path, 'rb') as f:
34
+ crop_scaler = pickle.load(f)
35
+ with open(model_path, 'rb') as f:
36
+ crop_model = pickle.load(f)
37
+
38
+ scaled_item = crop_scaler.transform(np.array(item).reshape(-1, len(item)))
39
+ prediction = crop_model.predict(scaled_item)[0]
40
+ return crops[prediction]
41
+
42
+ def get_fertilizer_recommendation(num_features, cat_features):
43
+ scaler_path = os.path.join(BASE_DIR, 'models', 'ML_models', 'fertilizer_scaler.pkl')
44
+ model_path = os.path.join(BASE_DIR, 'models', 'ML_models', 'fertilizer_model.pkl')
45
+
46
+ with open(scaler_path, 'rb') as f:
47
+ fertilizer_scaler = pickle.load(f)
48
+ with open(model_path, 'rb') as f:
49
+ fertilizer_model = pickle.load(f)
50
+
51
+ scaled_features = fertilizer_scaler.transform(np.array(num_features).reshape(-1, len(num_features)))
52
+ cat_features = np.array(cat_features).reshape(-1, len(cat_features))
53
+ item = np.concatenate([scaled_features, cat_features], axis=1)
54
+ prediction = fertilizer_model.predict(item)[0]
55
+ return fertilizer_classes[prediction]
56
+
57
+ crop_diseases_classes = {'strawberry': [(0, 'Leaf_scorch'), (1, 'healthy')],
58
+
59
+ 'patato': [(0, 'Early_blight'),
60
+ (1, 'Late_blight'),
61
+ (2, 'healthy')],
62
+
63
+ 'corn': [(0, 'Cercospora_leaf_spot Gray_leaf_spot'),
64
+ (1, 'Common_rust_'),
65
+ (2, 'Northern_Leaf_Blight'),
66
+ (3, 'healthy')],
67
+
68
+ 'apple': [(0, 'Apple_scab'),
69
+ (1, 'Black_rot'),
70
+ (2, 'Cedar_apple_rust'),
71
+ (3, 'healthy')],
72
+
73
+ 'cherry': [(0, 'Powdery_mildew'),
74
+ (1, 'healthy')],
75
+
76
+ 'grape': [(0, 'Black_rot'),
77
+ (1, 'Esca_(Black_Measles)'),
78
+ (2, 'Leaf_blight_(Isariopsis_Leaf_Spot)'),
79
+ (3, 'healthy')],
80
+
81
+ 'peach': [(0, 'Bacterial_spot'), (1, 'healthy')],
82
+
83
+ 'pepper': [(0, 'Bacterial_spot'),
84
+ (1, 'healthy')],
85
+
86
+ 'tomato': [(0, 'Bacterial_spot'),
87
+ (1, 'Early_blight'),
88
+ (2, 'Late_blight'),
89
+ (3, 'Leaf_Mold'),
90
+ (4, 'Septoria_leaf_spot'),
91
+ (5, 'Spider_mites Two-spotted_spider_mite'),
92
+ (6, 'Target_Spot'),
93
+ (7, 'Tomato_Yellow_Leaf_Curl_Virus'),
94
+ (8, 'Tomato_mosaic_virus'),
95
+ (9, 'healthy')]}
96
+
97
+ crop_list = list(crop_diseases_classes.keys())
98
+
99
+
100
+ crops = {'apple': 1, 'banana': 2, 'blackgram': 3, 'chickpea': 4, 'coconut': 5, 'coffee': 6, 'cotton': 7, 'grapes': 8, 'jute': 9, 'kidneybeans': 10, 'lentil': 11, 'maize': 12, 'mango': 13, 'mothbeans': 14, 'mungbean': 15, 'muskmelon': 16, 'orange': 17, 'papaya': 18, 'pigeonpeas': 19, 'pomegranate': 20, 'rice': 21, 'watermelon': 22}
101
+
102
+ crops = list(crops.keys())
103
+
104
+ soil_types = ['Black', 'Clayey', 'Loamy', 'Red', 'Sandy']
105
+ Crop_types = ['Barley', 'Cotton', 'Ground Nuts', 'Maize', 'Millets', 'Oil seeds', 'Paddy', 'Pulses', 'Sugarcane', 'Tobacco', 'Wheat']
106
+
107
+ fertilizer_classes = ['10-26-26', '14-35-14', '17-17-17', '20-20', '28-28', 'DAP', 'Urea']
AgriGo/models/DL_models/apple_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:750c527a839dd2f904f7f38d864743168788a9887028cb46cd259f7119e6d800
3
+ size 9357320
AgriGo/models/DL_models/cherry_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66c959abfbf4c3db84046109a530452be227f30de618932eda2baf4132965c12
3
+ size 9341960
AgriGo/models/DL_models/corn_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:384b4a39d7d5c673fb5b200ebbbe5bd5187d8be058e747908d3ad33b7ea15599
3
+ size 9357408
AgriGo/models/DL_models/grape_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b138ebab41ea18d974feff4fb93f2841897bbff589eb016dc0584c9770edff1a
3
+ size 9357408
AgriGo/models/DL_models/patato_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b9b41192ec30aa4016b148af465a04f977a2ac114600848f657b69628ff811e
3
+ size 9352288
AgriGo/models/DL_models/peach_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:943c59e5ea58abcf4e2584c05c23db55d018d94b18bc193e6c2839acddebef9e
3
+ size 9342048
AgriGo/models/DL_models/pepper_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:317075a51e45466e0cae30b3e0b12a1829ca11072f3ea9b3058aa0fcbc9f7be2
3
+ size 9342048
AgriGo/models/DL_models/strawberry_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ebf48996ef978342701a693e0e46bfe682ba918e077db045c0f4fbbc6b4cc8f
3
+ size 9344256
AgriGo/models/DL_models/tomato_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:897404fcfe90f0492234abb16e4e4a92aa6964d2b0651b47df7e88b5f7acb6b9
3
+ size 9388040
AgriGo/models/ML_models/crop_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c8289745ecd1d0a710afdb30b56938e49eb86bd439bba05a05b8a6b1e5ac1405
3
+ size 3315381
AgriGo/models/ML_models/crop_scaler.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dcf2d729fdafc4e876a8c2a67733e94862fc7d00323794bc0896053017ca19ae
3
+ size 757
AgriGo/models/ML_models/fertilizer_model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:530fed857eca71b2ec7896fed46cb7800fa5760ddaf7988de7a0a9d93b5b48c1
3
+ size 441982
AgriGo/models/ML_models/fertilizer_scaler.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2585f21a49e30dad3f59ef786c902a2fd4b441e1da70199fc37316aad2e1bff8
3
+ size 754
AgriGo/static/css/main.css ADDED
@@ -0,0 +1,284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *{
2
+ padding: 0;
3
+ margin: 0;
4
+ }
5
+
6
+
7
+ .navbar-brand p {
8
+ font-size:30px;
9
+ font-family: 'Kaushan Script', cursive;
10
+
11
+ }
12
+ #banner {
13
+ background: linear-gradient(rgba(0, 0, 0, 0.1), #627E5D), url(../images/bg.jpg);
14
+ background-size: cover;
15
+ background-position: center;
16
+ height: 100vh;
17
+ }
18
+ .banner-text {
19
+ text-align: center;
20
+ color: #fff;
21
+ padding-top: 120px;
22
+ }
23
+ .banner-text h1{
24
+ font-size: 130px;
25
+ padding-bottom: 20px;
26
+ font-family: 'Kaushan Script', cursive;
27
+ }
28
+ .banner-text p{
29
+ font-size: 24px;
30
+ font-weight: bold;
31
+ font-style: italic;
32
+ font-family: 'Poppins', sans-serif;
33
+ }
34
+ .banner-btn {
35
+ margin: 70px auto 0;
36
+ }
37
+ .banner-btn a {
38
+ width: 150Px;
39
+ display:inline-block;
40
+ text-decoration: none;
41
+ margin: 0 10px;
42
+ padding: 12px 0;
43
+ color: #fff;
44
+ border: .5px solid #fff;
45
+ position: relative;
46
+ z-index: 1;
47
+ transition: color 0.5s;
48
+ }
49
+
50
+ .banner-btn a span{
51
+ width: 0;
52
+ height: 100%;
53
+ position: absolute;
54
+ top: 0;
55
+ left: 0;
56
+ background: #fff;
57
+ z-index: -1;
58
+ transition: 0.5s;
59
+ }
60
+ .banner-btn a:hover span{
61
+ width: 100%;
62
+ }
63
+ .banner-btn a:hover{
64
+ color: #000;
65
+ }
66
+
67
+ #menuBtn {
68
+ width: 50px;
69
+ height: 50px;
70
+ background: #8CE17D;
71
+ text-align: center;
72
+ position: fixed;
73
+ right: 30px;
74
+ top:20px;
75
+ border-radius: 3px;
76
+ z-index: 3;
77
+ cursor: pointer;
78
+ }
79
+ #menuBtn a {
80
+ width: 20px;
81
+ margin-top: 15px;
82
+
83
+ }
84
+
85
+ #feature {
86
+ width: 100%;
87
+ padding: 70px 0;
88
+ }
89
+ .title-text {
90
+ text-align: center;
91
+ padding-bottom: 70px;
92
+ }
93
+ .title-text p {
94
+ margin:auto;
95
+ font-size: 20px;
96
+ color: #8CE17D;
97
+ font-weight: bold;
98
+ position: relative;
99
+ z-index: 1;
100
+ display:inline-block;
101
+ }
102
+ .title-text p::after {
103
+ content: '';
104
+ width: 50px;
105
+ height: 35px;
106
+ background: linear-gradient(#019587, #fff);
107
+ position: absolute;
108
+ top: -20px;
109
+ left: 0;
110
+ z-index: -1;
111
+ transform: rotate(10deg);
112
+ border-top-left-radius: 35px;
113
+ border-bottom-right-radius: 35px;
114
+ }
115
+ .title-text h1 {
116
+ font-size: 40px;
117
+ font-weight: bold;
118
+ }
119
+ .feature-box {
120
+ width: 80%;
121
+ margin: auto;
122
+ display: flex;
123
+ flex-wrap: wrap;
124
+ align-items: center;
125
+ text-align: center;
126
+ }
127
+ .features {
128
+ flex-basis: 50%;
129
+ }
130
+ .features-img {
131
+ flex-basis: 50%;
132
+ margin: auto;
133
+
134
+ }
135
+ .features-img img {
136
+ width: 70%;
137
+ border-radius: 10px;
138
+ }
139
+ .features h1 {
140
+ text-align: left;
141
+ margin-bottom: 10px;
142
+ font-weight: 100;
143
+ color: #8CE17D;
144
+ }
145
+ .features-desc {
146
+ display: flex;
147
+ align-items: center;
148
+ margin-bottom: 40px;
149
+ }
150
+ .feature-icon .fa{
151
+ width: 50px;
152
+ height: 50px;
153
+ font-size: 30px;
154
+ line-height: 50px;
155
+ border-radius: 8px;
156
+ color: #8CE17D;
157
+ border: 1px solid #8CE17D;
158
+ }
159
+ .feature-text p {
160
+ padding: 0 20px;
161
+ text-align: initial;
162
+ }
163
+ #services {
164
+ width: 100%;
165
+ padding: 70px 0;
166
+ }
167
+ .service-box {
168
+ width: 80%;
169
+ margin: auto;
170
+ display: flex;
171
+ justify-content: space-between;
172
+ align-items: flex-start;
173
+ flex-wrap: wrap;
174
+ }
175
+ .single-service {
176
+ flex-basis: 28%;
177
+ padding: 10px;
178
+ margin-bottom: 30px;
179
+ border-radius: 5px;
180
+ box-shadow: 0 10px 10px 3px #627E5D;
181
+ cursor: pointer;
182
+ transition: transform .5s;
183
+ }
184
+
185
+ .single-service p{
186
+ font-size: 14px;
187
+ }
188
+
189
+ .service-content {
190
+ display: flex;
191
+ align-items: center;
192
+ margin: 20px 0;
193
+ }
194
+ .services-content img {
195
+ width: 40px;
196
+ align-items: center;
197
+ border-radius: 3px;
198
+ }
199
+ .single-service h1 {
200
+ font-size: 24px;
201
+ color: #000;
202
+ }
203
+ .single-service:hover {
204
+ transform: translateY(7px);
205
+ }
206
+ #contact {
207
+ padding: 60px 0 20px;
208
+ background-image: linear-gradient(rgba(0, 0, 0, 0.1), #3b4638), url(../images/footer-bg.jpg);
209
+ }
210
+ .footer-row {
211
+ width: 80%;
212
+ margin: 0 auto;
213
+ display: flex;
214
+ justify-content: space-between;
215
+ flex-wrap: wrap;
216
+ padding-bottom: 20px;
217
+ }
218
+ .footer-title-text h1 {
219
+ text-align: center;
220
+ color: #fff;
221
+ padding-bottom: 70px;
222
+ }
223
+ .footer-right .footer-left {
224
+ flex-basis: 45%;
225
+ padding: 10px;
226
+ margin-bottom: 20px;
227
+ }
228
+
229
+ .footer-right h1 {
230
+ font-family: 'Kaushan Script', cursive;
231
+ }
232
+ .footer-left h1 {
233
+ font-family: 'Kaushan Script', cursive;
234
+ }
235
+
236
+ .footer-right {
237
+ text-align: right;
238
+ }
239
+ .footer-right a {
240
+ text-align: right;
241
+ color: #fff;
242
+ text-decoration: none;
243
+ }
244
+ .footer-row h1 {
245
+ color: #fff;
246
+ margin:5px 0;
247
+ }
248
+ .footer-row p {
249
+ line-height: 35px;
250
+ color: #fff;
251
+ }
252
+
253
+ @media screen and (max-width: 770px){
254
+ .banner-text h1{
255
+ font-size: 44px;
256
+ }
257
+ .banner-btn a {
258
+ display: block;
259
+ margin: 20px auto;
260
+ }
261
+ .title-text h1 {
262
+ font-size: 35px;
263
+ }
264
+ .features {
265
+ flex-basis: 100%;
266
+ }
267
+ .features-img {
268
+ flex-basis: 100%;
269
+ }
270
+ .features-img img {
271
+ width: 100%;
272
+ }
273
+ .single-service {
274
+ flex-basis: 100%;
275
+ padding-bottom: 5px;
276
+ }
277
+ .services-content {
278
+ flex-basis: 100%;
279
+ }
280
+
281
+ .hide {
282
+ display: none;
283
+ }
284
+ }
AgriGo/static/images/bg.jpg ADDED

Git LFS Details

  • SHA256: c6f3bd14e941910383a7a85f4b2fcf1544dd488a936cae1e8430a0689721868a
  • Pointer size: 131 Bytes
  • Size of remote file: 258 kB
AgriGo/static/images/features-bg.png ADDED

Git LFS Details

  • SHA256: a6f478e502980cf88a006655b64c53b99e8a67e7ca03cd51d6a5e30169af69aa
  • Pointer size: 131 Bytes
  • Size of remote file: 444 kB
AgriGo/static/images/footer-bg.jpg ADDED

Git LFS Details

  • SHA256: a0a36cc1be8b89bb4aa82eda653f57acda2a93b8b38524818c6247e94493e4aa
  • Pointer size: 131 Bytes
  • Size of remote file: 575 kB
AgriGo/static/images/service-1.jpg ADDED
AgriGo/static/images/service-2.jpg ADDED
AgriGo/static/images/service-3.jpg ADDED
AgriGo/static/images/upload-img.jpg ADDED

Git LFS Details

  • SHA256: ff351f82a6c0b05b819d2489b761b6c714642065ed21b0158d3822d52c99aafc
  • Pointer size: 131 Bytes
  • Size of remote file: 339 kB
AgriGo/static/images/upload.jpg ADDED
AgriGo/static/js/my.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ $(document).on('change', '.div-toggle', function() {
2
+ var target = $(this).data('target');
3
+ var show = $("option:selected", this).data('show');
4
+ $(target).children().addClass('hide');
5
+ $(show).removeClass('hide');
6
+ });
7
+ $(document).ready(function(){
8
+ $('.div-toggle').trigger('change');
9
+ });
AgriGo/templates/crop-disease.html ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "index.html" %}
2
+ {% block content %}
3
+ <div class="container pt-5">
4
+ <h1 class="text-center" style="color: #8CE17D;">Crop Disease Prediction</h1>
5
+ <p class="text-center pt-3">Our models provide you an easy,fast and efficient way to detect diseases in your plants.
6
+ </p>
7
+ </div>
8
+ <form action="{{ url_for('find_crop_disease')}}" method="POST" enctype="multipart/form-data"
9
+ style="margin-top: 30px; width: 80%; text-align: center; margin: auto">
10
+ <br>
11
+ <br>
12
+ <br>
13
+ <div class="container">
14
+ <div class="row d-flex justify-content-center">
15
+ <label>Choose a crop :</label>
16
+ <div class="col-md-4">
17
+
18
+ <select name="crop" class="form-control" required="required">
19
+ {% for crop in crops %}
20
+ <option type="text" value="{{crop}}" data-show=".{{crop}}">{{crop}}</option>
21
+ {% endfor %}
22
+ </select>
23
+ </div>
24
+ </div>
25
+ <br />
26
+ <div class="row d-flex justify-content-center">
27
+ <label>Upload your image : </label>
28
+ <div class="col-md-4 pt-2">
29
+
30
+ <input class="form-control" name="file" type="file" id="formFile" onchange="preview_image(event)"
31
+ required="required">
32
+
33
+ </div>
34
+
35
+ </div>
36
+ <img id="output-image" class="rounded mx-auto d-block" src="{{ url_for('send_file', filename=file_name)}}"
37
+ onerror="this.src='./static/images/upload.jpg'"
38
+ style="max-width: 500px; max-height: 450px; margin-top: 30px; margin-bottom: 2px" />
39
+ <p style="font-style: italic">{{ file_name }}</p>
40
+ <br>
41
+ <div class="row" style="text-align:center;">
42
+ <div class="col-md-12">
43
+ <button type="submit" class="btn btn-success" value="submit">predict</button>
44
+ </div>
45
+ </div>
46
+
47
+ </div>
48
+
49
+ </form>
50
+ <br>
51
+ <br>
52
+ <br>
53
+
54
+ <script type="text/javascript">
55
+ function preview_image(event) {
56
+ var reader = new FileReader();
57
+ reader.onload = function () {
58
+ var output = document.getElementById('output-image')
59
+ output.src = reader.result;
60
+ }
61
+ reader.readAsDataURL(event.target.files[0]);
62
+ }
63
+ </script>
64
+ <hr>
65
+
66
+ {% endblock %}
AgriGo/templates/crop-recommend.html ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "index.html" %}
2
+ {% block content %}
3
+
4
+ <div class="container pt-5">
5
+ <h1 class="text-center" style="color: #8CE17D;">Crop Recommendation</h1>
6
+ <p class="text-center pt-3">Using your soil composition data and weather condtions we can predict the best type of
7
+ crop to sow</p>
8
+ </div>
9
+ <br>
10
+ <br>
11
+ <div class="container">
12
+
13
+
14
+ <div class="col-md-4 col-md-offset-4" style="float: right; margin-top: 5%; margin-right: 10%;margin-bottom: 5%;">
15
+ <img src="./static/images/upload-img.jpg" width="500" height="333">
16
+ </div>
17
+
18
+ <form action="/crop-recommendation" method="POST" style="margin-top: 5%">
19
+ <div class="col-md-4 col-md-offset-4">
20
+
21
+ <label for="N">Amount of Azote :</label>
22
+ <input class="form-control" type="number" min="0" required="required" name="N" ,
23
+ placeholder="enter amount of azote">
24
+
25
+ </div>
26
+ <div class="col-md-4 col-md-offset-4">
27
+
28
+ <label for="P">Amount of Phosphorous :</label>
29
+ <input class="form-control" type="number" min="0" id="P" name="P" required="required"
30
+ placeholder="enter amount of phosphore">
31
+
32
+ </div>
33
+ <div class="col-md-4 col-md-offset-4">
34
+
35
+ <label for="K">Amount of Potassium :</label>
36
+ <input class="form-control" type="number" min="0" id="K" name="K" required="required"
37
+ placeholder="enter amount of potassium">
38
+
39
+ </div>
40
+ <div class="col-md-4 col-md-offset-4">
41
+
42
+ <label for="temperature">Soil Temperature :</label>
43
+ <input class="form-control" type="number" min="0" step="any" id="temperature" name="temperature"
44
+ required="required" placeholder="Enter soil temperature">
45
+
46
+ </div>
47
+ <div class="col-md-4 col-md-offset-4">
48
+
49
+ <label for="humidity">Soil Humidity :</label>
50
+ <input class="form-control" type="number" min="0" step="any" id="humidity" name="humidity" required="required"
51
+ placeholder="enter soil humidity level">
52
+
53
+ </div>
54
+ <div class="col-md-4 col-md-offset-4">
55
+
56
+ <label for="phosphore">Soil Ph :</label>
57
+ <input class="form-control" type="number" min="0" step="any" id="phosphore" name="phosphore" required="required"
58
+ placeholder="enter soil ph">
59
+
60
+ </div>
61
+ <div class="col-md-4 col-md-offset-4">
62
+
63
+ <label for="rainfall">Amount of RainFall :</label>
64
+ <input class="form-control" type="number" min="0" step="any" id="rainfall" name="rainfall" required="required"
65
+ placeholder="enter amout of rain recieved">
66
+
67
+ </div>
68
+ <br>
69
+
70
+
71
+ <div class="text-center" style="padding-top: 5%">
72
+ <button type="submit" class="btn btn-success" value="submit">predict</button>
73
+ </div>
74
+ <br>
75
+ <br>
76
+
77
+ </form>
78
+
79
+
80
+
81
+ </div>
82
+
83
+
84
+ <br>
85
+ <br>
86
+
87
+ {% endblock %}
AgriGo/templates/disease-prediction-result.html ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "index.html" %}
2
+ {% block content %}
3
+
4
+ <br>
5
+ <br>
6
+ <br>
7
+ <br>
8
+ <br>
9
+ <br>
10
+
11
+ <div class="container pt-5">
12
+ <h3 style="margin: auto;width: 80%; text-align: center; margin-top: 20px; text-transform: uppercase">Results Of Prediction</h3>
13
+ <div style="width: 90%; margin: auto; text-align: center">
14
+ <img src="{{ url_for('send_file', filename=image_file_name)}}" style ="max-width: 500px; max-height: 450px; margin-top: 30px; margin-bottom: 10px">
15
+ <p style="font-style: italic">{{ image_file_name }}</p>
16
+
17
+ <h3 style="margin-top: 40px"><b>Prediction: <span style="color: green">{{ result }}</span></b></h3>
18
+ <br>
19
+ <br>
20
+ <div class="prediction text-center">
21
+ <a href="/" class="smoothScroll btn btn-success wow fadeInDown" data-wow-delay="2000">Back Home</a>
22
+ </div>
23
+ </div>
24
+ <br>
25
+ <br>
26
+
27
+ {% endblock %}
AgriGo/templates/fertilizer-recommend.html ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "index.html" %}
2
+ {% block content %}
3
+
4
+ <div class="container pt-5">
5
+ <h1 class="text-center" style="color: #8CE17D;">Fertilizer Recommendation</h1>
6
+ <p class="text-center pt-3">
7
+ Using your soil composition data and the crop type we can find the best fertilizer
8
+ for better yield
9
+ </p>
10
+ </div>
11
+ <br>
12
+ <br>
13
+ <div class="container">
14
+
15
+
16
+ <div class="col-md-4 col-md-offset-4" style="float: right; margin-top: 5%; margin-right: 10%;margin-bottom: 5%;">
17
+ <img src="./static/images/upload-img.jpg" width="500" height="333">
18
+ </div>
19
+
20
+ <form action="/fertilizer-recommendation" method="POST" style="margin-top: 5%">
21
+ <div class="col-md-4 col-md-offset-4">
22
+ <label for="temperature">Soil Temperature :</label>
23
+ <input class="form-control" type="number" min="0" step="any" id="temperature" name="temperature"
24
+ required="required" placeholder="Enter soil temperature">
25
+ </div>
26
+ <div class="col-md-4 col-md-offset-4">
27
+
28
+ <label for="humidity">Soil Humidity :</label>
29
+ <input class="form-control" type="number" min="0" step="any" id="humidity" name="humidity"
30
+ required="required" placeholder="enter soil humidity level">
31
+
32
+ </div>
33
+ <div class="col-md-4 col-md-offset-4">
34
+
35
+ <label for="moisture">Soil Moisture :</label>
36
+ <input class="form-control" type="number" min="0" step="any" id="moisture" name="moisture"
37
+ required="required" placeholder="enter soil moisture level">
38
+
39
+ </div>
40
+ <div class="col-md-4 col-md-offset-4">
41
+
42
+ <label for="N">Amount of Azote :</label>
43
+ <input class="form-control" type="number" min="0" required="required" name="N" ,
44
+ placeholder="enter amount of azote">
45
+
46
+ </div>
47
+ <div class="col-md-4 col-md-offset-4">
48
+
49
+ <label for="P">Amount of Phosphorous :</label>
50
+ <input class="form-control" type="number" min="0" id="P" name="P" required="required"
51
+ placeholder="enter amount of phosphore">
52
+
53
+ </div>
54
+ <div class="col-md-4 col-md-offset-4">
55
+
56
+ <label for="K">Amount of Potassium :</label>
57
+ <input class="form-control" type="number" min="0" id="K" name="K" required="required"
58
+ placeholder="enter amount of potassium">
59
+
60
+ </div>
61
+ <div class="col-md-4 col-md-offset-4">
62
+
63
+ <label for="soil">Soil Type :</label>
64
+ <select name="soil" class="form-control" placeholder="enter your soil type" required="required">
65
+ {% for i, soil in soil_types %}
66
+ <option type="text" value="{{i}}" data-show=".{{soil}}">{{soil}}</option>
67
+ {% endfor %}
68
+ </select>
69
+
70
+ </div>
71
+ <div class="col-md-4 col-md-offset-4">
72
+
73
+ <label for="crop">Crop Type :</label>
74
+ <select name="crop" class="form-control" placeholder="enter crop type" required="required">
75
+ {% for i, crop in crop_types %}
76
+ <option type="text" value="{{i}}" data-show=".{{crop}}">{{crop}}</option>
77
+ {% endfor %}
78
+ </select>
79
+
80
+ </div>
81
+ <br>
82
+
83
+
84
+ <div class="text-center" style="padding-top: 5%">
85
+ <button type="submit" class="btn btn-success" value="submit">predict</button>
86
+ </div>
87
+ <br>
88
+ <br>
89
+
90
+ </form>
91
+
92
+
93
+
94
+ </div>
95
+
96
+
97
+ <br>
98
+ <br>
99
+
100
+ {% endblock %}
AgriGo/templates/index.html ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+
6
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge">
7
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ <title>Agri App</title>
10
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
11
+ integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
12
+ <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
13
+ integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
14
+ <link rel="stylesheet" type="text/css" href="./static/css/main.css">
15
+ <link rel="preconnect" href="https://fonts.googleapis.com">
16
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
17
+ <link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&family=Poppins:wght@100&display=swap"
18
+ rel="stylesheet">
19
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
20
+ <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
21
+ </head>
22
+
23
+ <body>
24
+ <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
25
+ <div class="container">
26
+ <a class="navbar-brand" href="/">
27
+ <p>AgriGo</p>
28
+ </a>
29
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
30
+ aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
31
+ <span class="navbar-toggler-icon"></span>
32
+ </button>
33
+ <div class="collapse navbar-collapse" id="navbarNav">
34
+ <ul class="navbar-nav m-auto">
35
+ <li class="nav-item">
36
+ <a class="nav-link active" aria-current="page" href="/">Home</a>
37
+ </li>
38
+ <li class="nav-item dropdown">
39
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
40
+ data-bs-toggle="dropdown" aria-expanded="false">
41
+ Services
42
+ </a>
43
+ <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
44
+ <li><a class="dropdown-item" href="/crop-disease">Crop Diseases</a></li>
45
+ <li><a class="dropdown-item" href="/fertilizer-recommendation">Fertilizer recommendation</a>
46
+ </li>
47
+ <li><a class="dropdown-item" href="/crop-recommendation">Crop recommendation</a></li>
48
+ </ul>
49
+ </li>
50
+ </ul>
51
+ </div>
52
+ </div>
53
+ </nav>
54
+ {% block content %}
55
+ <section id="banner">
56
+ <div class="banner-text">
57
+ <h1>AgriGo</h1>
58
+ <p>Levrage AI power to grow your field to the maximum</p>
59
+ <div class="banner-btn">
60
+ <a href="#services"><span></span>Find Out</a>
61
+ <a href="#feature"><span></span>Read More</a>
62
+ </div>
63
+ </div>
64
+ </section>
65
+
66
+ <section id="feature">
67
+ <div class="title-text">
68
+ <p>FEATURES</p>
69
+ <h1>WHY CHOOSE US</h1>
70
+ </div>
71
+ <div class="feature-box">
72
+ <div class="features">
73
+ <h1>Quick Diagnosis</h1>
74
+ <div class="features-desc">
75
+ <div class="feature-icon">
76
+ <i class="fa fa-bolt"></i>
77
+ </div>
78
+ <div class="feature-text">
79
+ <p>AI models make it possible to identify and treat crop diseases quickly and efficiently. </p>
80
+ </div>
81
+
82
+ </div>
83
+ <h1>Increase Yield</h1>
84
+ <div class="features-desc">
85
+ <div class="feature-icon">
86
+ <i class="fa fa-corn"></i>
87
+ </div>
88
+ <div class="feature-text">
89
+ <p>With our precise recommendations the farmer can easily maximize the yield of his fields. </p>
90
+ </div>
91
+
92
+ </div>
93
+ <h1>Reduce cost</h1>
94
+ <div class="features-desc">
95
+ <div class="feature-icon">
96
+ <i class="fa fa-dollar-sign"></i>
97
+ </div>
98
+ <div class="feature-text">
99
+ <p>There is no need for agricultural experts or advanced crop management tools thus reducing the
100
+ production cost. </p>
101
+ </div>
102
+
103
+ </div>
104
+
105
+ </div>
106
+ <div class="features-img">
107
+ <img src="./static/images/features-bg.png">
108
+ </div>
109
+ </div>
110
+ </section>
111
+
112
+ <section id="services">
113
+ <div class="title-text">
114
+ <p>SERVICES</p>
115
+ <h1>WE PROVIDE</h1>
116
+ </div>
117
+ <div class="service-box">
118
+
119
+ <div class="single-service">
120
+ <div class="service-content">
121
+ <img src="./static/images/service-1.jpg">
122
+ </div>
123
+ <a href="/crop-recommendation" style="color: #000">
124
+ <h1>Crop Recommendation</h1>
125
+ </a>
126
+ <p>Analyzes soil and weather data to find the best suited crop. </p>
127
+ </div>
128
+
129
+ <div class="single-service">
130
+ <div class="service-content">
131
+ <img src="./static/images/service-3.jpg">
132
+
133
+ </div>
134
+ <a href="/fertilizer-recommendation" style="color: #000">
135
+ <h1>Fertilizer Recommendation</h1>
136
+ </a>
137
+ <p>Analyzes soil and crop type to find the best fertilizer for your crop. </p>
138
+ </div>
139
+
140
+ <div class="single-service">
141
+ <div class="service-content">
142
+ <img src="./static/images/service-2.jpg">
143
+
144
+ </div>
145
+ <a href="/crop-disease" style="color: #000">
146
+ <h1>Crop Disease Prediction</h1>
147
+ </a>
148
+ <p>From the images of your crops our models can check their health. </p>
149
+ </div>
150
+
151
+ </div>
152
+ </section>
153
+
154
+ <section id="contact">
155
+ <div class="footer-title-text">
156
+ <h1>CONTACT ME</h1>
157
+ </div>
158
+ <div class="footer-row">
159
+ <div class="footer-left">
160
+ <h1>AgriGo</h1>
161
+ <p>Email: AymenMir1001@gmail.com</p>
162
+ </div>
163
+ <div class="footer-right">
164
+ <h1>AgriGo</h1>
165
+ <p>Github: <a href="https://github.com/Aymen1001"> <i class="fab fa-github"></i>Aymen1001 </a>
166
+ </p>
167
+ </div>
168
+ </div>
169
+ </section>
170
+
171
+ {% endblock %}
172
+
173
+ <script type="text/javascript" src="./static/js/my.js"></script>
174
+ <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"
175
+ integrity="sha384-W8fXfP3gkOKtndU4JGtKDvXbO53Wy8SZCQHczT5FMiiqmQfUpWbYdTil/SxwZgAN"
176
+ crossorigin="anonymous"></script>
177
+
178
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.min.js"
179
+ integrity="sha384-skAcpIdS7UcVUC05LJ9Dxay8AXcDYfBJqt1CJ85S/CFujBsIzCIv+l9liuYLaMQ/"
180
+ crossorigin="anonymous"></script>
181
+ </body>
182
+
183
+ </html>
AgriGo/templates/recommend_result.html ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% extends "index.html" %}
2
+ {% block content %}
3
+
4
+ <br>
5
+ <br>
6
+
7
+
8
+ <div class="container pt-5">
9
+ <h3 style="margin: auto;width: 80%; text-align: center; margin-top: 20px; text-transform: uppercase">Results Of Prediction</h3>
10
+ <div style="width: 90%; margin: auto; text-align: center">
11
+
12
+ <h3 style="margin-top: 40px"><b>Prediction: <span style="color: green">{{ result }}</span></b></h3>
13
+ <br>
14
+ <br>
15
+ <div class="prediction text-center">
16
+ <a href="/" class="smoothScroll btn btn-success wow fadeInDown" data-wow-delay="2000">Back Home</a>
17
+ </div>
18
+ </div>
19
+
20
+ <br>
21
+ <br>
22
+
23
+ {% endblock %}
AgriGo/uploads/00a55069-3fa3-405b-8d87-4d3408a6ed98___RS_NLB_3645.JPG ADDED
AgriGo/uploads/0a283423-3a6d-43a4-92e5-267c8153ca45___FREC_Pwd.M_4921.JPG ADDED
AgriGo/uploads/0ab4bd76-19fb-4372-9ac0-9582843c4008___FREC_Pwd.M_0263.JPG ADDED
AgriGo/uploads/0b37761a-de32-47ee-a3a4-e138b97ef542___JR_FrgE.S_2908.JPG ADDED
AgriGo/uploads/0b4fb93e-1a74-42ae-9227-18d900c04bd7___RS_NLB_3670.JPG ADDED
AgriGo/uploads/0b7b9ff9-4324-4ee0-a77c-6bf4b9331c6d___JR_HL_4110.JPG ADDED
AgriGo/uploads/0c4e75b2-e4aa-437e-815c-636271d66bec___JR_B.Spot_3244.JPG ADDED
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.8-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
+
10
+ # Install any needed packages specified in requirements.txt
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Install Node.js and nport
14
+ RUN apt update && apt install -y curl && \
15
+ curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
16
+ apt install -y nodejs && \
17
+ npm install -g nport
18
+
19
+ # Expose port 5000
20
+ EXPOSE 7860
21
+
22
+ # Define environment variable for Flask
23
+ ENV FLASK_APP=AgriGo/app.py
24
+
25
+ # Run the application
26
+ CMD ["flask", "run", "--host=0.0.0.0"]
LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Aymen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
Pipefile ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [[source]]
2
+ url = "https://pypi.org/simple"
3
+ verify_ssl = true
4
+ name = "pypi"
5
+
6
+ [packages]
7
+ absl-py = "==1.0.0"
8
+ astunparse = "==1.6.3"
9
+ cachetools = "==5.0.0"
10
+ certifi = "==2021.10.8"
11
+ charset-normalizer = "==2.0.12"
12
+ click = "==8.0.4"
13
+ flask = "==2.0.3"
14
+ flatbuffers = "==2.0"
15
+ gast = "==0.5.3"
16
+ google-auth = "==2.6.2"
17
+ google-auth-oauthlib = "==0.4.6"
18
+ google-pasta = "==0.2.0"
19
+ grpcio = "==1.45.0"
20
+ h5py = "==3.6.0"
21
+ idna = "==3.3"
22
+ importlib-metadata = "==4.11.3"
23
+ itsdangerous = "==2.1.1"
24
+ jinja2 = "==3.1.0"
25
+ joblib = "==1.1.0"
26
+ keras = "==2.8.0"
27
+ keras-preprocessing = "==1.1.2"
28
+ libclang = "==13.0.0"
29
+ markdown = "==3.3.6"
30
+ markupsafe = "==2.1.1"
31
+ numpy = "==1.22.3"
32
+ oauthlib = "==3.2.0"
33
+ opt-einsum = "==3.3.0"
34
+ pillow = "==9.0.1"
35
+ protobuf = "==3.19.4"
36
+ pyasn1 = "==0.4.8"
37
+ pyasn1-modules = "==0.2.8"
38
+ requests = "==2.27.1"
39
+ requests-oauthlib = "==1.3.1"
40
+ rsa = "==4.8"
41
+ scikit-learn = "==1.0.2"
42
+ scipy = "==1.8.0"
43
+ six = "==1.16.0"
44
+ tensorboard = "==2.8.0"
45
+ tensorboard-data-server = "==0.6.1"
46
+ tensorboard-plugin-wit = "==1.8.1"
47
+ tensorflow-cpu = "==2.8.0"
48
+ tensorflow-io-gcs-filesystem = "==0.24.0"
49
+ termcolor = "==1.1.0"
50
+ tf-estimator-nightly = "==2.8.0.dev2021122109"
51
+ threadpoolctl = "==3.1.0"
52
+ typing-extensions = "==4.1.1"
53
+ urllib3 = "==1.26.9"
54
+ werkzeug = "==2.0.3"
55
+ wrapt = "==1.14.0"
56
+ zipp = "==3.7.0"
57
+
58
+ [dev-packages]
59
+
60
+ [requires]
61
+ python_version = "3.9.21"
62
+
63
+
package.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "engines": {
3
+ "node": "18.x"
4
+ }
5
+ }
requirements.txt ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ absl-py==1.0.0
2
+ astunparse==1.6.3
3
+ cachetools==5.0.0
4
+ certifi==2021.10.8
5
+ charset-normalizer==2.0.12
6
+ click==8.0.4
7
+ Flask==2.0.3
8
+ flatbuffers==2.0
9
+ gast==0.5.3
10
+ google-auth==2.6.2
11
+ google-auth-oauthlib==0.4.6
12
+ google-pasta==0.2.0
13
+ grpcio==1.45.0
14
+ h5py==3.6.0
15
+ idna==3.3
16
+ importlib-metadata==4.11.3
17
+ itsdangerous==2.1.1
18
+ Jinja2==3.1.0
19
+ joblib==1.1.0
20
+ keras==2.8.0
21
+ Keras-Preprocessing==1.1.2
22
+ libclang==13.0.0
23
+ Markdown==3.3.6
24
+ MarkupSafe==2.1.1
25
+ numpy==1.22.3
26
+ oauthlib==3.2.0
27
+ opt-einsum==3.3.0
28
+ Pillow==9.0.1
29
+ protobuf==3.19.4
30
+ pyasn1==0.4.8
31
+ pyasn1-modules==0.2.8
32
+ requests==2.27.1
33
+ requests-oauthlib==1.3.1
34
+ rsa==4.8
35
+ scikit-learn==1.0.2
36
+ scipy==1.8.0
37
+ six==1.16.0
38
+ tensorboard==2.8.0
39
+ tensorboard-data-server==0.6.1
40
+ tensorboard-plugin-wit==1.8.1
41
+ tensorflow-cpu==2.8.0
42
+ tensorflow-io-gcs-filesystem==0.24.0
43
+ termcolor==1.1.0
44
+ tf-estimator-nightly==2.8.0.dev2021122109
45
+ threadpoolctl==3.1.0
46
+ typing-extensions==4.1.1
47
+ urllib3==1.26.9
48
+ Werkzeug==2.0.3
49
+ wrapt==1.14.0
50
+ zipp==3.7.0