samir1120 commited on
Commit
13e198b
·
verified ·
1 Parent(s): 2c82d30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = ['Daisy', 'Rose', 'Sunflower', 'Tulip', 'Dandelion']
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, or Dandelion)."
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