Spaces:
Runtime error
Runtime error
add app
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ import os
|
|
| 8 |
model = tf.keras.models.load_model("car_brand_classifier_final.h5")
|
| 9 |
|
| 10 |
# Define the path to the dataset containing car brand folders
|
| 11 |
-
DATASET_PATH = "
|
| 12 |
|
| 13 |
# Get the list of car brands (folder names) in the dataset
|
| 14 |
CAR_BRANDS = sorted(os.listdir(DATASET_PATH))
|
|
@@ -64,7 +64,7 @@ iface = gr.Interface(
|
|
| 64 |
inputs=gr.Image(type="numpy"), # Ensure Gradio passes a NumPy array
|
| 65 |
outputs=[
|
| 66 |
gr.Textbox(label="Predicted Brand"),
|
| 67 |
-
gr.Gallery(label="Sample Images")
|
| 68 |
],
|
| 69 |
title="Car Vision",
|
| 70 |
description="Upload an image of a car to classify its brand and view sample images."
|
|
|
|
| 8 |
model = tf.keras.models.load_model("car_brand_classifier_final.h5")
|
| 9 |
|
| 10 |
# Define the path to the dataset containing car brand folders
|
| 11 |
+
DATASET_PATH = "car_sales_images"
|
| 12 |
|
| 13 |
# Get the list of car brands (folder names) in the dataset
|
| 14 |
CAR_BRANDS = sorted(os.listdir(DATASET_PATH))
|
|
|
|
| 64 |
inputs=gr.Image(type="numpy"), # Ensure Gradio passes a NumPy array
|
| 65 |
outputs=[
|
| 66 |
gr.Textbox(label="Predicted Brand"),
|
| 67 |
+
gr.Gallery(label="Sample Images") # Display images in a gallery
|
| 68 |
],
|
| 69 |
title="Car Vision",
|
| 70 |
description="Upload an image of a car to classify its brand and view sample images."
|