Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def get_valid_aug(): return albumentations.Compose([
|
|
36 |
albumentations.Resize(224, 224),
|
37 |
], p=1.0)
|
38 |
|
39 |
-
learn = load_learner(
|
40 |
|
41 |
labels = learn.dls.vocab
|
42 |
|
@@ -49,11 +49,11 @@ def predict(img):
|
|
49 |
title = "Fruit and Vegetation Classifier"
|
50 |
description = '''A simple app to classify various fruits and vegetables '''
|
51 |
|
52 |
-
examples = [[
|
53 |
-
[
|
54 |
-
[
|
55 |
-
[
|
56 |
-
[
|
57 |
enable_queue = True
|
58 |
|
59 |
gr.Interface (fn= predict,
|
|
|
36 |
albumentations.Resize(224, 224),
|
37 |
], p=1.0)
|
38 |
|
39 |
+
learn = load_learner('fruit_model_v2.pkl')
|
40 |
|
41 |
labels = learn.dls.vocab
|
42 |
|
|
|
49 |
title = "Fruit and Vegetation Classifier"
|
50 |
description = '''A simple app to classify various fruits and vegetables '''
|
51 |
|
52 |
+
examples = [['Onion.jpg'],
|
53 |
+
['orange.jpg'],
|
54 |
+
['plum.jpg'],
|
55 |
+
['tomato.jpg'],
|
56 |
+
['banana.jpg']]
|
57 |
enable_queue = True
|
58 |
|
59 |
gr.Interface (fn= predict,
|