CZerion commited on
Commit
42df5c4
·
verified ·
1 Parent(s): 2169058

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -6,14 +6,17 @@ from PIL import Image
6
  # Retrieve Hugging Face token from Secrets
7
  hf_token = os.getenv("HF_TOKEN")
8
 
 
9
  plant_disease_classifier = pipeline(
10
  task="image-classification",
11
- model="linkanjarad/mobilenet_v2_1.0_224-plant-disease-identification",
 
12
  top_k=3
13
  )
14
  nutrient_deficiency_classifier = pipeline(
15
  task="image-classification",
16
- model="sabari15/ViT-base16-fine-tuned-crop-disease-model",
 
17
  top_k=3
18
  )
19
 
 
6
  # Retrieve Hugging Face token from Secrets
7
  hf_token = os.getenv("HF_TOKEN")
8
 
9
+ # Initialize two classification pipelines with authentication
10
  plant_disease_classifier = pipeline(
11
  task="image-classification",
12
+ model="linkanjarad/mobilenet_v2_1.0_224-plant-disease-identification",
13
+ use_auth_token=hf_token,
14
  top_k=3
15
  )
16
  nutrient_deficiency_classifier = pipeline(
17
  task="image-classification",
18
+ model="nateraw/vit-base-beans",
19
+ use_auth_token=hf_token,
20
  top_k=3
21
  )
22