Spaces:
Runtime error
Runtime error
Ferdinand Tom-Eshemogie
commited on
Commit
·
c164bba
1
Parent(s):
3037da5
Added examples images
Browse files
aj1.jpeg
ADDED
aj11.png
ADDED
aj13.jpeg
ADDED
aj4.jpeg
ADDED
app.py
CHANGED
@@ -25,12 +25,17 @@ def classify_image(img):
|
|
25 |
# This part sets up the Gradio web interface, specifying the function to call for predictions,
|
26 |
# the type of input it expects (an image), and the type of output (text).
|
27 |
|
|
|
|
|
|
|
|
|
28 |
|
29 |
iface = gr.Interface(fn=classify_image,
|
30 |
inputs=gr.Image(type='pil'), # Specifies that the input should be an image, automatically converted to PILImage
|
31 |
outputs="text", # Specifies that the output is text (the prediction and probability)
|
32 |
title="Air Jordan Model Classifier", # Title of the web interface
|
33 |
-
description="Upload an image of Air Jordan sneakers, and the classifier will predict the model."
|
|
|
34 |
|
35 |
# This condition checks if the script is being run as the main program and launches the Gradio interface.
|
36 |
# It ensures that the Gradio server starts only when this script is executed directly, not when imported as a module.
|
|
|
25 |
# This part sets up the Gradio web interface, specifying the function to call for predictions,
|
26 |
# the type of input it expects (an image), and the type of output (text).
|
27 |
|
28 |
+
examples = ['/Users/drizzytom/Documents/aj_classifier/aj1.jpeg',
|
29 |
+
'/Users/drizzytom/Documents/aj_classifier/aj4.jpeg',
|
30 |
+
'/Users/drizzytom/Documents/aj_classifier/aj11.png',
|
31 |
+
'/Users/drizzytom/Documents/aj_classifier/aj13.jpeg']
|
32 |
|
33 |
iface = gr.Interface(fn=classify_image,
|
34 |
inputs=gr.Image(type='pil'), # Specifies that the input should be an image, automatically converted to PILImage
|
35 |
outputs="text", # Specifies that the output is text (the prediction and probability)
|
36 |
title="Air Jordan Model Classifier", # Title of the web interface
|
37 |
+
description="Upload an image of Air Jordan sneakers, and the classifier will predict the model.",
|
38 |
+
examples=examples) #Add examples images
|
39 |
|
40 |
# This condition checks if the script is being run as the main program and launches the Gradio interface.
|
41 |
# It ensures that the Gradio server starts only when this script is executed directly, not when imported as a module.
|