Thiago-Cerq commited on
Commit
f1b2686
1 Parent(s): 0f94132

Upload 12 files

Browse files
Files changed (13) hide show
  1. .gitattributes +2 -0
  2. L2.jpg +0 -0
  3. Lion (1).jpg +3 -0
  4. P1.jpg +0 -0
  5. README.md +13 -0
  6. T2.jpg +0 -0
  7. T3.jpg +0 -0
  8. Tiger (1).jpg +0 -0
  9. app.py +25 -0
  10. gitattributes +36 -0
  11. king.png +0 -0
  12. requirements (1).txt +1 -0
  13. resnet (1).pkl +3 -0
.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ Lion[[:space:]](1).jpg filter=lfs diff=lfs merge=lfs -text
2
+ resnet[[:space:]](1).pkl filter=lfs diff=lfs merge=lfs -text
L2.jpg ADDED
Lion (1).jpg ADDED

Git LFS Details

  • SHA256: cbb414d3120bc492d6df5703ffda2d837243bf82c70aee6b8d5c1bcae2c06259
  • Pointer size: 132 Bytes
  • Size of remote file: 4.07 MB
P1.jpg ADDED
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Tigre Or Lion Resnet
3
+ emoji: 🦀
4
+ colorFrom: yellow
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: 4.11.0
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
T2.jpg ADDED
T3.jpg ADDED
Tiger (1).jpg ADDED
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastai.vision.all import *
2
+ import gradio as gr
3
+
4
+
5
+ learn = load_learner('resnet.pkl')
6
+
7
+ categories = ('Leão', 'Tigre')
8
+
9
+ # Function to classify the image using the selected model
10
+ def classify_image(img):
11
+ _, _, probs = learn.predict(img)
12
+ return dict(zip(categories, map(float, probs)))
13
+
14
+ # Define input and output components
15
+ image = gr.Image()
16
+ label = gr.Label()
17
+
18
+ # Examples for testing
19
+ examples = ['Lion.jpg','Tiger.jpg','L2.jpg','T2.jpg','P1.jpg','T3.jpg','king.png']
20
+
21
+ # Create Gradio Interface
22
+ intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
23
+
24
+ # Launch the Gradio interface
25
+ intf.launch(inline=False)
gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
36
+ Lion.jpg filter=lfs diff=lfs merge=lfs -text
king.png ADDED
requirements (1).txt ADDED
@@ -0,0 +1 @@
 
 
1
+ fastai
resnet (1).pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3843df2e9342d2ea5e3bef95c047e5459a64654a12c5b26c785b6a69abdbd7a1
3
+ size 102902159