update
Browse files- app.py +3 -1
- requirements.txt +2 -1
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
|
|
3 |
|
4 |
learn = load_learner('berry_model.pkl')
|
5 |
|
6 |
-
catergories = ("strawberry", "blueberry", "raspberry", "cranberry", "mulberry", "other")
|
|
|
7 |
|
8 |
def classify_image(img):
|
9 |
pred,idx,probs = learn.predict(img)
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
+
import timm
|
4 |
|
5 |
learn = load_learner('berry_model.pkl')
|
6 |
|
7 |
+
#catergories = ("strawberry", "blueberry", "raspberry", "cranberry", "mulberry", "other")
|
8 |
+
categories = learn.dls.vocab
|
9 |
|
10 |
def classify_image(img):
|
11 |
pred,idx,probs = learn.predict(img)
|
requirements.txt
CHANGED
@@ -2,4 +2,5 @@ fastai
|
|
2 |
torch
|
3 |
gradio
|
4 |
numpy
|
5 |
-
pandas
|
|
|
|
2 |
torch
|
3 |
gradio
|
4 |
numpy
|
5 |
+
pandas
|
6 |
+
timm
|