SarowarSaurav commited on
Commit
43c8e35
1 Parent(s): 7b15e8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -4,8 +4,11 @@ import torch
4
  from PIL import Image
5
 
6
  # Load the image processor and model
7
- processor = AutoImageProcessor.from_pretrained("ozair23/swin-tiny-patch4-window7-224-finetuned-plantdisease")
8
- model = AutoModelForImageClassification.from_pretrained("ozair23/swin-tiny-patch4-window7-224-finetuned-plantdisease")
 
 
 
9
 
10
  # Define the function to process the image and make predictions
11
  def classify_leaf_disease(image):
 
4
  from PIL import Image
5
 
6
  # Load the image processor and model
7
+ # Load model directly
8
+ from transformers import AutoImageProcessor, AutoModelForImageClassification
9
+
10
+ processor = AutoImageProcessor.from_pretrained("linkanjarad/mobilenet_v2_1.0_224-plant-disease-identification")
11
+ model = AutoModelForImageClassification.from_pretrained("linkanjarad/mobilenet_v2_1.0_224-plant-disease-identification")
12
 
13
  # Define the function to process the image and make predictions
14
  def classify_leaf_disease(image):