Joshua commited on
Commit
bf447bc
1 Parent(s): 32ccc5c

Added the model pkl, the example jpg, and evapp.py to the folder

Browse files
Files changed (6) hide show
  1. .gitattributes +1 -0
  2. bmw ix.jpg +3 -0
  3. evapp.py +38 -0
  4. export.pkl +3 -0
  5. merc eqc.jpg +3 -0
  6. tesla model 3.jpg +3 -0
.gitattributes CHANGED
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
32
  *.zip filter=lfs diff=lfs merge=lfs -text
33
  *.zst filter=lfs diff=lfs merge=lfs -text
34
  *tfevents* filter=lfs diff=lfs merge=lfs -text
35
+ *.jpg filter=lfs diff=lfs merge=lfs -text
bmw ix.jpg ADDED

Git LFS Details

  • SHA256: 284a94e2b824bf7a7005d8a85c60b4dcc339293253f93dda9b35ebcafa5b89d9
  • Pointer size: 132 Bytes
  • Size of remote file: 4.88 MB
evapp.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AUTOGENERATED! DO NOT EDIT! File to edit: evclassifierapp.ipynb.
2
+
3
+ # %% auto 0
4
+ __all__ = ['learn', 'labels', 'title', 'description', 'interpretation', 'examples', 'enable_queue', 'intf', 'classify_image']
5
+
6
+ # %% evclassifierapp.ipynb 1
7
+ from fastai.vision.all import *
8
+
9
+ # %% evclassifierapp.ipynb 2
10
+ learn = load_learner('export.pkl')
11
+
12
+ # %% evclassifierapp.ipynb 4
13
+ labels = learn.dls.vocab
14
+
15
+ def classify_image(img):
16
+ img = PILImage.create(img)
17
+ pred,idx,probs = learn.predict(img)
18
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
19
+
20
+ # %% evclassifierapp.ipynb 5
21
+ title = "EV Car Classifier"
22
+ description = "This model will recognise the EV car in question"
23
+ interpretation='default'
24
+ examples = ['bmw ix.jpg','merc eqc.jpg','tesla model 3.jpg']
25
+ enable_queue=True
26
+
27
+ # %% evclassifierapp.ipynb 6
28
+ import gradio as gr
29
+
30
+ intf = gr.Interface(fn=classify_image,
31
+ inputs=gr.inputs.Image(shape=(512, 512)),
32
+ outputs=gr.outputs.Label(num_top_classes=3),
33
+ title=title,
34
+ description=description,
35
+ examples=examples,
36
+ interpretation=interpretation,
37
+ enable_queue=enable_queue)
38
+ intf.launch()
export.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8f6b1327e9cc02ee81185305acf46fc643e1eef2b3b71338e6b58d87ae3c05c
3
+ size 46956766
merc eqc.jpg ADDED

Git LFS Details

  • SHA256: 58ffd1909e8e6a8cb4d2338d08c092d59748adea8c5a3c6dd92fddc44f8742eb
  • Pointer size: 132 Bytes
  • Size of remote file: 1.52 MB
tesla model 3.jpg ADDED

Git LFS Details

  • SHA256: adc7014785c5b96b0ff9082e89615aaabe7284a5a3d165e7bd81c45caa96bd8a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.68 MB