Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,12 @@ import gradio as gr
|
|
3 |
|
4 |
def is_cat(x): return x[0].isupper()
|
5 |
|
|
|
6 |
categories = ('Grizzly','Black','Teddy')
|
7 |
def classify_image(img):
|
8 |
pred,idx,confidence = learn.predict(img)
|
9 |
return dict(zip(categories,map(float,confidence)))
|
10 |
-
|
11 |
|
12 |
|
13 |
image = gr.inputs.Image(shape=(192,192))
|
|
|
3 |
|
4 |
def is_cat(x): return x[0].isupper()
|
5 |
|
6 |
+
learn=load_learner('export.pkl')
|
7 |
categories = ('Grizzly','Black','Teddy')
|
8 |
def classify_image(img):
|
9 |
pred,idx,confidence = learn.predict(img)
|
10 |
return dict(zip(categories,map(float,confidence)))
|
11 |
+
|
12 |
|
13 |
|
14 |
image = gr.inputs.Image(shape=(192,192))
|