Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,8 +5,8 @@ import gradio as gr
|
|
| 5 |
image_classifier = pipeline("image-classification")
|
| 6 |
|
| 7 |
# Define a function for image classification using Gradio
|
| 8 |
-
def classify_image(
|
| 9 |
-
result = image_classifier(
|
| 10 |
return result[0]['label'] # Return the label of the top prediction
|
| 11 |
|
| 12 |
# Create a Gradio interface
|
|
|
|
| 5 |
image_classifier = pipeline("image-classification")
|
| 6 |
|
| 7 |
# Define a function for image classification using Gradio
|
| 8 |
+
def classify_image(image):
|
| 9 |
+
result = image_classifier(image)
|
| 10 |
return result[0]['label'] # Return the label of the top prediction
|
| 11 |
|
| 12 |
# Create a Gradio interface
|