Spaces:
Running
Running
ajaydamsani
commited on
Commit
•
9d5a6bb
1
Parent(s):
7194dab
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import matplotlib.pyplot as plt
|
|
11 |
working_dir = os.path.dirname(os.path.abspath(__file__))
|
12 |
model_path = "crop_disease_detection_model.h5"
|
13 |
model = tf.keras.models.load_model(model_path)
|
14 |
-
class_indices = json.load(open(
|
15 |
|
16 |
# Function to Load and Preprocess the Image using Pillow
|
17 |
def load_and_preprocess_image(image_path, target_size=(224, 224)):
|
|
|
11 |
working_dir = os.path.dirname(os.path.abspath(__file__))
|
12 |
model_path = "crop_disease_detection_model.h5"
|
13 |
model = tf.keras.models.load_model(model_path)
|
14 |
+
class_indices = json.load(open("class_indices.json"))
|
15 |
|
16 |
# Function to Load and Preprocess the Image using Pillow
|
17 |
def load_and_preprocess_image(image_path, target_size=(224, 224)):
|