usama1355 commited on
Commit
8bbc81c
·
verified ·
1 Parent(s): 74fd286

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -118,7 +118,7 @@ TOMATO_TREATMENTS = {
118
  }
119
 
120
  # --- RICE CONFIGURATION ---
121
- RICE_MODEL_PATH = "Efficient_RiceModel.tflite"
122
  RICE_CLASS_NAMES = ['Bacterial Leaf Blight', 'Brown Spot', 'Healthy Rice Leaf', 'Leaf Blast', 'Leaf scald', 'Narrow Brown Leaf Spot', 'Rice Hispa', 'Sheath Blight']
123
 
124
  # 🏥 NEW: Rice Treatment Knowledge Base
@@ -407,8 +407,7 @@ async def predict_rice(file: UploadFile = File(...)):
407
  })
408
  image = image.resize((224, 224))
409
 
410
- input_data = np.array(image).astype(np.float32)
411
- input_data = efficientnet_preprocess(input_data)
412
  input_data = np.expand_dims(input_data, axis=0)
413
 
414
  # --- RUN INFERENCE (Using Rice Interpreter) ---
 
118
  }
119
 
120
  # --- RICE CONFIGURATION ---
121
+ RICE_MODEL_PATH = "New_Rice_Model.tflite"
122
  RICE_CLASS_NAMES = ['Bacterial Leaf Blight', 'Brown Spot', 'Healthy Rice Leaf', 'Leaf Blast', 'Leaf scald', 'Narrow Brown Leaf Spot', 'Rice Hispa', 'Sheath Blight']
123
 
124
  # 🏥 NEW: Rice Treatment Knowledge Base
 
407
  })
408
  image = image.resize((224, 224))
409
 
410
+ input_data = np.array(image).astype(np.float32)/255.0
 
411
  input_data = np.expand_dims(input_data, axis=0)
412
 
413
  # --- RUN INFERENCE (Using Rice Interpreter) ---