Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,6 @@ def classify_image_vit(image):
|
|
37 |
|
38 |
# Predicted label
|
39 |
predicted_label = vit_model.config.id2label.get(predicted_class_idx, "Unknown")
|
40 |
-
# Example: If your id2label from HF is something like "corn diseased" or "rice healthy",
|
41 |
-
# match it to the dictionary key for treatments (above). For demonstration:
|
42 |
treatment_text = vit_label_treatment.get(predicted_label, "No specific treatment available.")
|
43 |
return predicted_label, treatment_text
|
44 |
|
|
|
37 |
|
38 |
# Predicted label
|
39 |
predicted_label = vit_model.config.id2label.get(predicted_class_idx, "Unknown")
|
|
|
|
|
40 |
treatment_text = vit_label_treatment.get(predicted_label, "No specific treatment available.")
|
41 |
return predicted_label, treatment_text
|
42 |
|