Mishmosh commited on
Commit
3cea84f
1 Parent(s): 2490569

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(image_path):
9
- result = image_classifier(image_path)
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