Spaces:
Sleeping
Sleeping
michaela299 commited on
Commit ·
e79c75c
1
Parent(s): 1d027be
try to fix it
Browse files
app.py
CHANGED
|
@@ -6,47 +6,7 @@ import torch
|
|
| 6 |
|
| 7 |
from datasets import load_dataset
|
| 8 |
dataset = load_dataset("DScomp380/plant_village", split="train")
|
| 9 |
-
CLASS_NAMES = [
|
| 10 |
-
"Apple___Apple_scab",
|
| 11 |
-
"Apple___Black_rot",
|
| 12 |
-
"Apple___Cedar_apple_rust",
|
| 13 |
-
"Apple___healthy",
|
| 14 |
-
"Blueberry___healthy",
|
| 15 |
-
"Cherry_(including_sour)___Powdery_mildew",
|
| 16 |
-
"Cherry_(including_sour)___healthy",
|
| 17 |
-
"Corn_(maize)___Cercospora_leaf_spot_Gray_leaf_spot",
|
| 18 |
-
"Corn_(maize)___Common_rust_",
|
| 19 |
-
"Corn_(maize)___Northern_Leaf_Blight",
|
| 20 |
-
"Corn_(maize)___healthy",
|
| 21 |
-
"Grape___Black_rot",
|
| 22 |
-
"Grape___Esca_(Black_Measles)",
|
| 23 |
-
"Grape___Leaf_blight_(Isariopsis_Leaf_Spot)",
|
| 24 |
-
"Grape___healthy",
|
| 25 |
-
"Orange___Haunglongbing_(Citrus_greening)",
|
| 26 |
-
"Peach___Bacterial_spot",
|
| 27 |
-
"Peach___healthy",
|
| 28 |
-
"Pepper,_bell___Bacterial_spot",
|
| 29 |
-
"Pepper,_bell___healthy",
|
| 30 |
-
"Potato___Early_blight",
|
| 31 |
-
"Potato___Late_blight",
|
| 32 |
-
"Potato___healthy",
|
| 33 |
-
"Raspberry___healthy",
|
| 34 |
-
"Soybean___healthy",
|
| 35 |
-
"Squash___Powdery_mildew",
|
| 36 |
-
"Strawberry___Leaf_scorch",
|
| 37 |
-
"Strawberry___healthy",
|
| 38 |
-
"Tomato___Bacterial_spot",
|
| 39 |
-
"Tomato___Early_blight",
|
| 40 |
-
"Tomato___Late_blight",
|
| 41 |
-
"Tomato___Leaf_Mold",
|
| 42 |
-
"Tomato___Septoria_leaf_spot",
|
| 43 |
-
"Tomato___Spider_mites_Two-spotted_spider_mite",
|
| 44 |
-
"Tomato___Target_Spot",
|
| 45 |
-
"Tomato___Tomato_Yellow_Leaf_Curl_Virus",
|
| 46 |
-
"Tomato___Tomato_mosaic_virus",
|
| 47 |
-
"Tomato___healthy"
|
| 48 |
-
]
|
| 49 |
-
|
| 50 |
|
| 51 |
|
| 52 |
#load the model
|
|
|
|
| 6 |
|
| 7 |
from datasets import load_dataset
|
| 8 |
dataset = load_dataset("DScomp380/plant_village", split="train")
|
| 9 |
+
CLASS_NAMES = dataset.features["label"].names
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
#load the model
|