Ivan Rodrigues
commited on
Commit
•
66a0fec
1
Parent(s):
27c1be4
fix: added requirements.txt
Browse files- app.py +1 -1
- requirements.txt +2 -0
app.py
CHANGED
@@ -5,7 +5,7 @@ import gradio as gr
|
|
5 |
learn = load_learner("model.pkl")
|
6 |
|
7 |
# Define an object with labels (keys) and tensors (values)
|
8 |
-
categories = {"
|
9 |
def classify_image(img):
|
10 |
pred,_,probs = learn.predict(img)
|
11 |
return dict(zip(categories, map(float,probs)))
|
|
|
5 |
learn = load_learner("model.pkl")
|
6 |
|
7 |
# Define an object with labels (keys) and tensors (values)
|
8 |
+
categories = {"Dog", "Cat"}
|
9 |
def classify_image(img):
|
10 |
pred,_,probs = learn.predict(img)
|
11 |
return dict(zip(categories, map(float,probs)))
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
fastai
|
2 |
+
gradio
|