Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
|
|
|
4 |
|
5 |
learn = load_learner('export.pkl')
|
6 |
labels = learn.dls.vocab
|
7 |
|
|
|
|
|
|
|
8 |
def predict(img):
|
9 |
img = PILImage.create(img)
|
10 |
pred,pred_idx,probs = learn.predict(img)
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
|
4 |
+
def is_cat(x): return x[0].isupper()
|
5 |
|
6 |
learn = load_learner('export.pkl')
|
7 |
labels = learn.dls.vocab
|
8 |
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
def predict(img):
|
13 |
img = PILImage.create(img)
|
14 |
pred,pred_idx,probs = learn.predict(img)
|