Spaces:
Running
Running
Commit
·
7b63a41
1
Parent(s):
6a97f68
Add examples
Browse files- app.py +1 -9
- examples/ak47.jpg +0 -0
- examples/ar15.jpg +0 -0
- examples/famas.jpg +0 -0
- examples/m16.jpg +0 -0
- examples/m4.jpg +0 -0
- examples/scar.jpg +0 -0
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
3 |
-
import skimage
|
4 |
|
5 |
learn = load_learner('export.pkl')
|
6 |
|
@@ -12,14 +11,7 @@ def predict(img):
|
|
12 |
|
13 |
title = "Assault Rifles Classifier"
|
14 |
description = "By now classifier is trained to distinguish the following rifles: AK-47, AR-15, FAMAS, FN SCAR, M16, M4 Carabine"
|
15 |
-
examples =
|
16 |
-
"https://cdn.britannica.com/70/123170-050-D7AAF458/AK-47.jpg",
|
17 |
-
"https://www.washingtonpost.com/news/checkpoint/wp-content/uploads/sites/33/2016/06/GettyImages-158539059.jpg",
|
18 |
-
"https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/FAMAS-G2-IMG_8894-white.jpg/1200px-FAMAS-G2-IMG_8894-white.jpg",
|
19 |
-
"https://fnamerica.com/wp-content/uploads/2016/12/SCAR-17S-FDE_026.jpg",
|
20 |
-
"https://media.istockphoto.com/id/157406050/tr/foto%C4%9Fraf/m-16-rifle.jpg?s=612x612&w=0&k=20&c=Cn8TthP4fErUQtkeoy6B9efJGhzw8gjislHkbeRlaHA=",
|
21 |
-
"https://upload.wikimedia.org/wikipedia/commons/6/68/PEO_M4_Carbine_RAS_M68_CCO.png"
|
22 |
-
]
|
23 |
interpretation='default'
|
24 |
enable_queue=True
|
25 |
|
|
|
1 |
import gradio as gr
|
2 |
from fastai.vision.all import *
|
|
|
3 |
|
4 |
learn = load_learner('export.pkl')
|
5 |
|
|
|
11 |
|
12 |
title = "Assault Rifles Classifier"
|
13 |
description = "By now classifier is trained to distinguish the following rifles: AK-47, AR-15, FAMAS, FN SCAR, M16, M4 Carabine"
|
14 |
+
examples = get_image_files("examples")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
interpretation='default'
|
16 |
enable_queue=True
|
17 |
|
examples/ak47.jpg
ADDED
![]() |
examples/ar15.jpg
ADDED
![]() |
examples/famas.jpg
ADDED
![]() |
examples/m16.jpg
ADDED
![]() |
examples/m4.jpg
ADDED
![]() |
examples/scar.jpg
ADDED
![]() |