Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from PIL import Image
|
|
7 |
model = tf.keras.models.load_model('Nutrient-Model.h5')
|
8 |
|
9 |
# Define the class names
|
10 |
-
class_names = ['
|
11 |
|
12 |
# Function to classify the image
|
13 |
def classify_image(image):
|
@@ -41,7 +41,7 @@ def classify_image(image):
|
|
41 |
# Define the Gradio interface
|
42 |
inputs = gr.inputs.Image()
|
43 |
outputs = gr.outputs.Textbox()
|
44 |
-
interface = gr.Interface(fn=classify_image, inputs=inputs, outputs=outputs, title="Image Classification", description="Classify an image into one of five classes:
|
45 |
|
46 |
# Launch the interface
|
47 |
interface.launch()
|
|
|
7 |
model = tf.keras.models.load_model('Nutrient-Model.h5')
|
8 |
|
9 |
# Define the class names
|
10 |
+
class_names = ['Magnesium','Nitrogen','Potassium','Phosphorus','Sulfur','Calcium']
|
11 |
|
12 |
# Function to classify the image
|
13 |
def classify_image(image):
|
|
|
41 |
# Define the Gradio interface
|
42 |
inputs = gr.inputs.Image()
|
43 |
outputs = gr.outputs.Textbox()
|
44 |
+
interface = gr.Interface(fn=classify_image, inputs=inputs, outputs=outputs, title="Image Classification", description="Classify an image into one of five classes: Phosphorus, Magnesium, Nitrogen, Potassium, Calcium,Sulfur.")
|
45 |
|
46 |
# Launch the interface
|
47 |
interface.launch()
|