SalmanAboAraj commited on
Commit
8c57cc8
·
1 Parent(s): 9f5d02d

Upload 19 files

Browse files
Files changed (19) hide show
  1. 1.jpg +0 -0
  2. 10.jpg +0 -0
  3. 2.jpeg +0 -0
  4. 3.jpg +0 -0
  5. 4.jpg +0 -0
  6. 5.jpg +0 -0
  7. 6.png +0 -0
  8. 7.jpg +0 -0
  9. 8.jpeg +0 -0
  10. 9.jpg +0 -0
  11. Binarymodel.pkl +3 -0
  12. README.md +4 -4
  13. app.py +42 -0
  14. b.jpg +0 -0
  15. d.jpg +0 -0
  16. e.jpg +0 -0
  17. f.jpg +0 -0
  18. gitattributes.txt +35 -0
  19. requirements.txt +3 -0
1.jpg ADDED
10.jpg ADDED
2.jpeg ADDED
3.jpg ADDED
4.jpg ADDED
5.jpg ADDED
6.png ADDED
7.jpg ADDED
8.jpeg ADDED
9.jpg ADDED
Binarymodel.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b63339567e5909decdf8b55eeea78059758dbaa0ccb483e05cd172896323fe
3
+ size 87504287
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Binary
3
- emoji: 💻
4
- colorFrom: red
5
- colorTo: blue
6
  sdk: gradio
7
  sdk_version: 3.35.2
8
  app_file: app.py
 
1
  ---
2
+ title: SalmanAboAraj
3
+ emoji: 🏃
4
+ colorFrom: indigo
5
+ colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.35.2
8
  app_file: app.py
app.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import platform
2
+ import pathlib
3
+ plt = platform.system()
4
+ pathlib.WindowsPath = pathlib.PosixPath
5
+
6
+
7
+ import requests
8
+
9
+
10
+ # AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
11
+
12
+ # %% auto 0
13
+ __all__ = ['learn', 'categories', 'image', 'label', 'examples', 'interface', 'classify_image']
14
+
15
+ # %% app.ipynb 1
16
+ from fastai.vision.all import *
17
+ import PIL.Image
18
+ PIL.Image.MAX_IMAGE_PIXELS = None
19
+ from PIL import Image
20
+
21
+ import gradio as gr
22
+
23
+ # %% app.ipynb 2
24
+ learn = load_learner('Binarymodel.pkl')
25
+
26
+ # %% app.ipynb 3
27
+ categories=('Random','X_ray')
28
+
29
+ def classify_image(img):
30
+ pred,indx,probs=learn.predict(img)
31
+ return dict(zip(categories,map(float,probs)))
32
+
33
+
34
+ # %% app.ipynb 4
35
+ image=gr.inputs.Image(shape=(512,512))
36
+ label=gr.outputs.Label()
37
+ examples=['1.jpg','10.jpg','2.jpeg','9.jpg','3.jpg','4.jpg','5.jpg','6.png','7.jpg',
38
+ '8.jpeg','9.jpg','b.jpg','d.jpg','f.jpg','e.jpg']
39
+
40
+
41
+ interface=gr.Interface(fn=classify_image, inputs=image ,outputs=label,examples=examples)
42
+ interface.launch(inline=False)
b.jpg ADDED
d.jpg ADDED
e.jpg ADDED
f.jpg ADDED
gitattributes.txt ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ fastbook
2
+ fastai
3
+ torch