moadams commited on
Commit
df6517b
1 Parent(s): 69723a1

installed additional packages

Browse files
app.py.197bbcc06daf9e04d14c423527374e94.tmp ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #|export
2
+ from fastai.vision.all import *
3
+ import gradio as gr
4
+ from fastbook import *
5
+
6
+ def is_cat(x): return x[0].isupper()
7
+
8
+ #|export
9
+ learn = load_learner('model.pkl')
10
+
11
+ #|export
12
+ categories = ('Dog', 'Cat')
13
+ def classify_image(im):
14
+ pred, idx, probs = learn.predict(im)
15
+ return dict(zip(categories, map(float, probs)))
16
+
17
+ #|export
18
+ categories = ('Dog', 'Cat')
19
+
20
+ def classify_image(im):
21
+ pred, idx, probs = learn.predict(im)
22
+ return dict(zip(categories, map(float, probs)))