changed structure of the project
Browse files- app.py +2 -2
- images/cat.jpg → cat.jpg +0 -0
- images/dog.jpg → dog.jpg +0 -0
- images/dunno.jpg → dunno.jpg +0 -0
- model/model.pkl → model.pkl +0 -0
app.py
CHANGED
|
@@ -6,7 +6,7 @@ def is_cat(x):
|
|
| 6 |
return x[0].isupper()
|
| 7 |
|
| 8 |
|
| 9 |
-
learn = load_learner("model
|
| 10 |
categories = ("Dog", "Cat")
|
| 11 |
|
| 12 |
|
|
@@ -18,7 +18,7 @@ def classify_image(img):
|
|
| 18 |
|
| 19 |
image = gr.inputs.Image(shape=(192, 192))
|
| 20 |
label = gr.outputs.Label()
|
| 21 |
-
examples = ["
|
| 22 |
|
| 23 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 24 |
intf.launch(inline=False)
|
|
|
|
| 6 |
return x[0].isupper()
|
| 7 |
|
| 8 |
|
| 9 |
+
learn = load_learner("model.pkl")
|
| 10 |
categories = ("Dog", "Cat")
|
| 11 |
|
| 12 |
|
|
|
|
| 18 |
|
| 19 |
image = gr.inputs.Image(shape=(192, 192))
|
| 20 |
label = gr.outputs.Label()
|
| 21 |
+
examples = ["dog.jpg", "cat.jpg", "dunno.jpg"]
|
| 22 |
|
| 23 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
| 24 |
intf.launch(inline=False)
|
images/cat.jpg → cat.jpg
RENAMED
|
File without changes
|
images/dog.jpg → dog.jpg
RENAMED
|
File without changes
|
images/dunno.jpg → dunno.jpg
RENAMED
|
File without changes
|
model/model.pkl → model.pkl
RENAMED
|
File without changes
|