Update app.py
Browse files
app.py
CHANGED
@@ -38,10 +38,10 @@ def predict(image):
|
|
38 |
features = extract_resnet_features(image)
|
39 |
|
40 |
# Make prediction using Random Forest classifier
|
41 |
-
|
42 |
|
43 |
# Decode predicted class using the class labels obtained from the Random Forest classifier
|
44 |
-
predicted_class = class_labels[predicted_index]
|
45 |
return predicted_class
|
46 |
|
47 |
# Define Gradio interface
|
|
|
38 |
features = extract_resnet_features(image)
|
39 |
|
40 |
# Make prediction using Random Forest classifier
|
41 |
+
predicted_class = rf_classifier.predict([features])[0]
|
42 |
|
43 |
# Decode predicted class using the class labels obtained from the Random Forest classifier
|
44 |
+
# predicted_class = class_labels[predicted_index]
|
45 |
return predicted_class
|
46 |
|
47 |
# Define Gradio interface
|