(SangYeop) commited on
Commit
fd01946
·
1 Parent(s): 94df62b
Files changed (7) hide show
  1. .gitignore +0 -0
  2. FullHair.jpg +3 -0
  3. app.py +18 -0
  4. bald_detector.ipynb +0 -0
  5. hair_loss_head.jpg +3 -0
  6. model.pkl +3 -0
  7. teamjang.jpg +3 -0
.gitignore ADDED
The diff for this file is too large to render. See raw diff
 
FullHair.jpg ADDED

Git LFS Details

  • SHA256: 3024c2716e9901c68812fe457797a2dc7003d4b843abf380ab54a38f2964f096
  • Pointer size: 130 Bytes
  • Size of remote file: 16.6 kB
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastai.vision.all import *
2
+ import gradio as gr
3
+
4
+ def is_balding(x): return x[0].isupper()
5
+
6
+ learn = load_learner('model.pkl')
7
+ categories = ('Balding', 'Full Hair')
8
+
9
+ def classify_image(img):
10
+ pred, idx, probs = learn.predict(img)
11
+ return dict(zip(categories, map(float, probs)))
12
+
13
+ image = gr.Image()
14
+ label = gr.Label()
15
+ examples = ['hair_loss_head.jpg', 'FullHair.jpg', 'teamjang.jpg']
16
+
17
+ intf = gr.Interface(fn= classify_image, inputs= image, outputs= label, examples= examples)
18
+ intf.launch(inline=False)
bald_detector.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
hair_loss_head.jpg ADDED

Git LFS Details

  • SHA256: 2804fa4239088aeba97a344b908943ab2f5368ba46f999ea4a5a50a24aa0399b
  • Pointer size: 130 Bytes
  • Size of remote file: 68.2 kB
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27e53b866485f8151415958ca1e5a43eac68ecfb7fbd1732588c477744d8698a
3
+ size 46961214
teamjang.jpg ADDED

Git LFS Details

  • SHA256: 6d3b0d661b988a737a8c1240f79b38082d4d056e06b60a4dc532142eb3952cf8
  • Pointer size: 131 Bytes
  • Size of remote file: 193 kB