Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from tensorflow.keras.utils import load_img, img_to_array
|
|
7 |
model = joblib.load("flower1.pkl")
|
8 |
|
9 |
# Define the class names (must match the training dataset order)
|
10 |
-
class_names = [
|
11 |
|
12 |
# Function to preprocess the image and make predictions
|
13 |
def predict_flower(image):
|
@@ -23,7 +23,7 @@ def predict_flower(image):
|
|
23 |
|
24 |
# Create the Gradio interface
|
25 |
title = "Flower Classification"
|
26 |
-
description = "Upload an image of a flower, and the model will predict the type of flower (Daisy, Rose, Sunflower, Tulip
|
27 |
|
28 |
gr_interface = gr.Interface(
|
29 |
fn=predict_flower, # Function to process predictions
|
|
|
7 |
model = joblib.load("flower1.pkl")
|
8 |
|
9 |
# Define the class names (must match the training dataset order)
|
10 |
+
class_names = ["Rose", "Tulip", "Daisy", "Sunflower", "Daffodil","Lily","Orchid","Lotus","Jasmine","Marigold","Hibiscus","Tube rose","Gladiolus","Frangipani","Iris","Dahlia"]
|
11 |
|
12 |
# Function to preprocess the image and make predictions
|
13 |
def predict_flower(image):
|
|
|
23 |
|
24 |
# Create the Gradio interface
|
25 |
title = "Flower Classification"
|
26 |
+
description = "Upload an image of a flower, and the model will predict the type of flower (Daisy, Rose, Sunflower, Tulip etc.)."
|
27 |
|
28 |
gr_interface = gr.Interface(
|
29 |
fn=predict_flower, # Function to process predictions
|