Thiago-Cerq commited on
Commit
134f6a5
·
1 Parent(s): 2fd498c

Upload 10 files

Browse files
Files changed (11) hide show
  1. .gitattributes +3 -0
  2. Aizen.jpg +0 -0
  3. Ichibe.jpg +0 -0
  4. Ichigo.jpg +3 -0
  5. README.md +30 -6
  6. Urahara.jpg +3 -0
  7. Zaraki.jpg +3 -0
  8. app.py +76 -0
  9. model18.pkl +3 -0
  10. model34.pkl +3 -0
  11. model50.pkl +3 -0
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* 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
 
 
 
 
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
36
+ Ichigo.jpg filter=lfs diff=lfs merge=lfs -text
37
+ Urahara.jpg filter=lfs diff=lfs merge=lfs -text
38
+ Zaraki.jpg filter=lfs diff=lfs merge=lfs -text
Aizen.jpg ADDED
Ichibe.jpg ADDED
Ichigo.jpg ADDED

Git LFS Details

  • SHA256: f5f74d7a0b4a2e72e4253cd1db33b92da4431bab203002607dce71d403d3b43d
  • Pointer size: 132 Bytes
  • Size of remote file: 1.33 MB
README.md CHANGED
@@ -1,13 +1,37 @@
1
  ---
2
- title: Pilar Identify
3
- emoji: 🏃
4
  colorFrom: red
5
- colorTo: blue
6
  sdk: gradio
7
- sdk_version: 3.47.1
8
  app_file: app.py
9
  pinned: false
10
- license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Warrior
3
+ emoji: 🔥
4
  colorFrom: red
5
+ colorTo: red
6
  sdk: gradio
 
7
  app_file: app.py
8
  pinned: false
 
9
  ---
10
 
11
+ # Configuration
12
+
13
+ `title`: _string_
14
+ Display title for the Space
15
+
16
+ `emoji`: _string_
17
+ Space emoji (emoji-only character allowed)
18
+
19
+ `colorFrom`: _string_
20
+ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
21
+
22
+ `colorTo`: _string_
23
+ Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
24
+
25
+ `sdk`: _string_
26
+ Can be either `gradio` or `streamlit`
27
+
28
+ `sdk_version` : _string_
29
+ Only applicable for `streamlit` SDK.
30
+ See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
31
+
32
+ `app_file`: _string_
33
+ Path to your main application file (which contains either `gradio` or `streamlit` Python code).
34
+ Path is relative to the root of the repository.
35
+
36
+ `pinned`: _boolean_
37
+ Whether the Space stays on top of your list.
Urahara.jpg ADDED

Git LFS Details

  • SHA256: 432eaf61eea4a0e49657948ecefe747b6f7f25a0f599f25b23f4fa3208be4205
  • Pointer size: 132 Bytes
  • Size of remote file: 1.48 MB
Zaraki.jpg ADDED

Git LFS Details

  • SHA256: 35f8a9dc2f355793d313cb987a5a284ec1f4ab1d320351ba2a36b71f9943d426
  • Pointer size: 132 Bytes
  • Size of remote file: 1.41 MB
app.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+ import skimage
4
+
5
+ learn = load_learner('modelo18.pkl')
6
+
7
+ labels = learn.dls.vocab
8
+ def predict(img):
9
+ img = PILImage.create(img)
10
+ pred,pred_idx,probs = learn.predict(img)
11
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
+
13
+ title = "Bleach - Qual potencial de guerra?"
14
+ description = "Reconhecer os 5 Potenciais (Bleach)"
15
+ examples = ['Aizen.jpg', 'Ichigo.jpg', 'Zaraki.jpg','Ichibe.jpg', 'Urahar.jpg']
16
+ interpretation='default'
17
+ enable_queue=True
18
+
19
+ gr.Interface(fn=predict,
20
+ inputs=gr.inputs.Image(shape=(512, 512)),
21
+ outputs=gr.outputs.Label(num_top_classes=3),
22
+ title=title,
23
+ description=description,
24
+ examples=examples,
25
+ interpretation=interpretation,
26
+ enable_queue=enable_queue).launch()
27
+
28
+ #////////////////////////////////////////////////////////////////////////////////////////////////
29
+
30
+ learn02 = load_learner('modelo34.pkl')
31
+
32
+ labels = learn.dls.vocab
33
+ def predict(img):
34
+ img = PILImage.create(img)
35
+ pred,pred_idx,probs = learn.predict(img)
36
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
37
+
38
+ title = "Bleach - Qual potencial de guerra?"
39
+ description = "Reconhecer os 5 Potenciais (Bleach)"
40
+ examples = ['Aizen.jpg', 'Ichigo.jpg', 'Zaraki.jpg','Ichibe.jpg', 'Urahar.jpg']
41
+ interpretation='default'
42
+ enable_queue=True
43
+
44
+ gr.Interface(fn=predict,
45
+ inputs=gr.inputs.Image(shape=(512, 512)),
46
+ outputs=gr.outputs.Label(num_top_classes=3),
47
+ title=title,
48
+ description=description,
49
+ examples=examples,
50
+ interpretation=interpretation,
51
+ enable_queue=enable_queue).launch()
52
+
53
+ #////////////////////////////////////////////////////////////////////////////////////////////////
54
+
55
+ learn03 = load_learner('modelo50.pkl')
56
+
57
+ labels = learn.dls.vocab
58
+ def predict(img):
59
+ img = PILImage.create(img)
60
+ pred,pred_idx,probs = learn.predict(img)
61
+ return {labels[i]: float(probs[i]) for i in range(len(labels))}
62
+
63
+ title = "Bleach - Qual potencial de guerra?"
64
+ description = "Reconhecer os 5 Potenciais (Bleach)"
65
+ examples = ['Aizen.jpg', 'Ichigo.jpg', 'Zaraki.jpg','Ichibe.jpg', 'Urahar.jpg']
66
+ interpretation='default'
67
+ enable_queue=True
68
+
69
+ gr.Interface(fn=predict,
70
+ inputs=gr.inputs.Image(shape=(512, 512)),
71
+ outputs=gr.outputs.Label(num_top_classes=3),
72
+ title=title,
73
+ description=description,
74
+ examples=examples,
75
+ interpretation=interpretation,
76
+ enable_queue=enable_queue).launch()
model18.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd7f99fd4f6668d2db5dd3af3463b765baa05639f4853dd6383bec6103dcdaf0
3
+ size 46978159
model34.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3630fa5352ab1b038b6fe20b020db0c1517b811be35ca66013aff93375a3b8ef
3
+ size 87484143
model50.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d2873fa05ae3af82d7a5eb42de7bde318bb28f96647e51526d046aaa2f08b31
3
+ size 102904931