SavlonBhai commited on
Commit
825ba7a
·
verified ·
1 Parent(s): 506539b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +73 -38
app.py CHANGED
@@ -7,56 +7,91 @@ import pandas as pd
7
 
8
  # Define the breeds based on Indian bovine classification
9
  BREEDS = [
10
- "Gir", "Red Sindhi", "Sahiwal", "Tharparkar", "Hariana",
11
- "Kankrej", "Ongole", "Krishna Valley", "Deoni", "Hallikar",
12
- "Amritmahal", "Khillari", "Kangayam", "Bargur", "Umblachery",
13
- "Pulikulam", "Alambadi", "Jersey", "Holstein Friesian", "Brown Swiss",
14
- "Murrah", "Surti", "Jaffrabadi", "Bhadawari", "Nili Ravi",
15
- "Mehsana", "Nagpuri", "Toda", "Marathwadi", "Pandharpuri"
16
  ]
17
 
18
  # Breed information dictionary
19
  BREED_INFO = {
20
- "Gir": {
21
- "type": "Indigenous Dairy",
22
- "origin": "Gujarat, India",
23
- "characteristics": "Known for high milk yield and disease resistance",
24
- "milk_yield": "1200-1800 liters per lactation",
25
- "special_features": "Distinctive lyre-shaped horns and pendulous ears"
26
  },
27
- "Red Sindhi": {
28
- "type": "Indigenous Dairy",
29
- "origin": "Sindh Province (now Pakistan)",
30
- "characteristics": "Heat tolerant, good milk producer",
31
- "milk_yield": "1100-2270 liters per lactation",
32
- "special_features": "Red color coat with white markings"
33
  },
34
- "Sahiwal": {
35
- "type": "Indigenous Dairy",
36
- "origin": "Punjab, Pakistan/India",
37
- "characteristics": "Excellent milk producer, tick resistant",
38
- "milk_yield": "2270-2500 liters per lactation",
39
- "special_features": "Reddish dun to red color with white markings"
 
 
 
 
 
 
 
40
  },
41
- "Hallikar": {
42
- "type": "Indigenous Draught",
43
- "origin": "Karnataka, India",
44
- "characteristics": "Strong draught animal, good for ploughing",
45
- "milk_yield": "500-700 liters per lactation",
46
- "special_features": "Grey color with black markings on face and legs"
47
  },
48
  "Murrah": {
49
- "type": "Indigenous Buffalo",
50
- "origin": "Haryana, Punjab",
51
- "characteristics": "World's best dairy buffalo breed",
52
- "milk_yield": "1800-2500 liters per lactation",
53
- "special_features": "Black color with tightly coiled horns"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
- # Add more breed details as needed
56
- }
57
 
58
  class IndianBovineClassifier:
59
- def __init__(self, model_path=None):
60
  """Initialize the classifier with a pre-trained model"""
61
  if model_path:
62
  self.model = tf.keras.models.load_model(model_path)
 
7
 
8
  # Define the breeds based on Indian bovine classification
9
  BREEDS = [
10
+ 'Ayrshire cattle', 'Brown Swiss cattle', 'Holstein Friesian cattle', 'Jaffrabadi', 'Jersey cattle', 'Murrah', 'Red Dane cattle', 'kankarej', 'sahiwal', 'sahiwal cross', 'sibbi'
 
 
 
 
 
11
  ]
12
 
13
  # Breed information dictionary
14
  BREED_INFO = {
15
+ "Ayrshire cattle": {
16
+ "type": "Dairy Cow",
17
+ "origin": "Scotland",
18
+ "characteristics": "Strong, adaptable, excellent udder conformation and superior grazing ability",
19
+ "milk_yield": "6000-7000 liters per lactation",
20
+ "special_features": "Red and white patches, hardy in cold weather, high butterfat content"
21
  },
22
+ "Brown Swiss cattle": {
23
+ "type": "Dual-purpose (Dairy & Beef)",
24
+ "origin": "Switzerland",
25
+ "characteristics": "Docile, strong, excellent for cheese production, disease resistant",
26
+ "milk_yield": "10000-14000 liters per lactation",
27
+ "special_features": "Light to dark brown color with creamy white muzzle, exceptional longevity"
28
  },
29
+ "Holstein Friesian cattle": {
30
+ "type": "Dairy Cow",
31
+ "origin": "Netherlands/Germany",
32
+ "characteristics": "Highest milk production, excellent feed conversion, docile temperament",
33
+ "milk_yield": "8000-12000 liters per lactation",
34
+ "special_features": "Distinctive black and white patches, large frame, heat sensitive"
35
+ },
36
+ "Jaffrabadi": {
37
+ "type": "Indigenous Dairy Buffalo",
38
+ "origin": "Gujarat, India (Saurashtra region)",
39
+ "characteristics": "Heaviest Indian buffalo breed, adapted to harsh semi-arid conditions",
40
+ "milk_yield": "2000-2500 liters per lactation",
41
+ "special_features": "Black color, dome-shaped forehead, ring-like horns, highest butterfat content"
42
  },
43
+ "Jersey cattle": {
44
+ "type": "Dairy Cow",
45
+ "origin": "Jersey, Channel Islands",
46
+ "characteristics": "Efficient feed conversion, calving ease, heat tolerant, docile",
47
+ "milk_yield": "4500-6500 liters per lactation",
48
+ "special_features": "Light tan to fawn color, smallest dairy breed, highest butterfat percentage"
49
  },
50
  "Murrah": {
51
+ "type": "Indigenous Dairy Buffalo",
52
+ "origin": "Haryana and Punjab, India",
53
+ "characteristics": "Highest milk yielding buffalo breed, docile nature, good mothers",
54
+ "milk_yield": "2200-3000 liters per lactation",
55
+ "special_features": "Jet black color, tightly curved horns, compact body structure"
56
+ },
57
+ "Red Dane cattle": {
58
+ "type": "Dual-purpose (Dairy & Beef)",
59
+ "origin": "Denmark",
60
+ "characteristics": "Hardy, disease resistant, excellent meat quality, easy calving",
61
+ "milk_yield": "8000-10000 liters per lactation",
62
+ "special_features": "Red to dark mahogany color with white markings, good heat tolerance"
63
+ },
64
+ "kankarej": {
65
+ "type": "Indigenous Dual-purpose (Dairy & Draught)",
66
+ "origin": "Gujarat, India (Kankrej territory)",
67
+ "characteristics": "Active, strong draught animal, drought resistant, disease resistant",
68
+ "milk_yield": "1500-2000 liters per lactation",
69
+ "special_features": "Silver to gray to steel black color, lyre-shaped horns, large pendulous ears"
70
+ },
71
+ "sahiwal": {
72
+ "type": "Indigenous Dairy Cow",
73
+ "origin": "Punjab, Pakistan/India",
74
+ "characteristics": "Heat resistant, tick resistant, high disease resistance, docile",
75
+ "milk_yield": "2500-3200 liters per lactation",
76
+ "special_features": "Brownish red to grayish red color, loose dewlap, compact build"
77
+ },
78
+ "sahiwal cross": {
79
+ "type": "Crossbred Dairy Cow",
80
+ "origin": "Cross breeding programs (Sahiwal x exotic breeds)",
81
+ "characteristics": "Hybrid vigor, improved milk yield, better adaptability than pure exotic",
82
+ "milk_yield": "3000-4200 liters per lactation",
83
+ "special_features": "Variable color depending on cross, moderate heat tolerance, enhanced productivity"
84
+ },
85
+ "sibbi": {
86
+ "type": "Indigenous Dual-purpose (Draught & Beef)",
87
+ "origin": "Sibi, Baluchistan, Pakistan",
88
+ "characteristics": "Largest Zebu breed, exceptional size, extremely hardy, massive build",
89
+ "milk_yield": "1500-2200 liters per lactation",
90
+ "special_features": "Pure white to grey with black neck, tallest cattle breed, exhibited at Sibi Mela"
91
  }
 
 
92
 
93
  class IndianBovineClassifier:
94
+ def __init__(self, model_path=tf_efficientnetv2_s_in21k):
95
  """Initialize the classifier with a pre-trained model"""
96
  if model_path:
97
  self.model = tf.keras.models.load_model(model_path)