ruidanwang commited on
Commit
7927f67
·
verified ·
1 Parent(s): c55807a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,7 +2,7 @@
2
  import fastai
3
  from fastai.vision import *
4
  from fastai.vision.learner import load_learner
5
- from PIL import Image as PILImage
6
  import gradio as gr
7
 
8
  # Load the model
@@ -11,7 +11,7 @@ model = load_learner("model.pkl")
11
  # Define an image classification function
12
  def classify_image(image):
13
  # Preprocess the image
14
- image = PILImage.create(image).resize((192, 192))
15
 
16
  # Make a prediction
17
  prediction = model.predict(image)[0]
 
2
  import fastai
3
  from fastai.vision import *
4
  from fastai.vision.learner import load_learner
5
+ from PIL import Image
6
  import gradio as gr
7
 
8
  # Load the model
 
11
  # Define an image classification function
12
  def classify_image(image):
13
  # Preprocess the image
14
+ image = Image.create(image).resize((192, 192))
15
 
16
  # Make a prediction
17
  prediction = model.predict(image)[0]