NLTuan commited on
Commit
f4ba9fe
·
1 Parent(s): a51e608

final on the main branch

Browse files
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from fastai.vision.all import *
3
+
4
+ categories = ["great white", "zebra", "whale", "lemon", "thresher"]
5
+ learner = load_learner("shark_recognizer.pkl")
6
+ def recognize_shark(img):
7
+ pred, idx, probs = learner.predict(img)
8
+ return dict(zip(categories, map(float, probs)))
9
+
10
+ image = gr.inputs.Image()
11
+ label = gr.outputs.Label()
12
+ iface = gr.Interface(fn=recognize_shark, inputs=image, outputs=label)
13
+ iface.launch()
examples/great white.png ADDED

Git LFS Details

  • SHA256: c87262b44f3b90c3dad4ac3dfb2b10169924a18e7d33b63a925cec4932c41eff
  • Pointer size: 132 Bytes
  • Size of remote file: 2.8 MB
examples/lemon.png ADDED

Git LFS Details

  • SHA256: 24f0c5cde7d8f00cc955ea763d8de79ab66211eea8a978d9d01562f6a506f25a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.64 MB
examples/thresher.png ADDED

Git LFS Details

  • SHA256: ac4ebc555a677c1742efde860d71c265dedba8baa1c28885497211c7081e2fbe
  • Pointer size: 131 Bytes
  • Size of remote file: 629 kB
examples/whale.png ADDED

Git LFS Details

  • SHA256: 4326b8b6cb9dd4ab00dae58b909310d729658a9f128f07d9624b7d8cfb098d3e
  • Pointer size: 131 Bytes
  • Size of remote file: 573 kB
examples/zebra.png ADDED

Git LFS Details

  • SHA256: a0ef97aa5d70d2854edda50bd68da7cde18fdffc39b035c52f314a636034e2de
  • Pointer size: 131 Bytes
  • Size of remote file: 320 kB
requirements.txt ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.1.0
2
+ aiohttp==3.8.5
3
+ aiosignal==1.3.1
4
+ altair==5.0.1
5
+ annotated-types==0.5.0
6
+ anyio==3.7.1
7
+ async-timeout==4.0.2
8
+ attrs==23.1.0
9
+ blis==0.7.9
10
+ Brotli==1.0.9
11
+ catalogue==2.0.8
12
+ certifi==2023.5.7
13
+ charset-normalizer==3.2.0
14
+ click==8.1.6
15
+ cmake==3.27.0
16
+ confection==0.1.0
17
+ contourpy==1.1.0
18
+ cycler==0.11.0
19
+ cymem==2.0.7
20
+ duckduckgo-search==3.8.4
21
+ exceptiongroup==1.1.2
22
+ fastai==2.7.12
23
+ fastapi==0.100.0
24
+ fastcore==1.5.29
25
+ fastdownload==0.0.7
26
+ fastprogress==1.0.3
27
+ ffmpy==0.3.1
28
+ filelock==3.12.2
29
+ fonttools==4.41.0
30
+ frozenlist==1.4.0
31
+ fsspec==2023.6.0
32
+ gradio==3.37.0
33
+ gradio_client==0.2.10
34
+ h11==0.14.0
35
+ h2==4.1.0
36
+ hpack==4.0.0
37
+ httpcore==0.17.3
38
+ httpx==0.24.1
39
+ huggingface-hub==0.16.4
40
+ hyperframe==6.0.1
41
+ idna==3.4
42
+ Jinja2==3.1.2
43
+ joblib==1.3.1
44
+ jsonschema==4.18.4
45
+ jsonschema-specifications==2023.7.1
46
+ kiwisolver==1.4.4
47
+ langcodes==3.3.0
48
+ linkify-it-py==2.0.2
49
+ lit==16.0.6
50
+ lxml==4.9.3
51
+ markdown-it-py==2.2.0
52
+ MarkupSafe==2.1.3
53
+ matplotlib==3.7.2
54
+ mdit-py-plugins==0.3.3
55
+ mdurl==0.1.2
56
+ mpmath==1.3.0
57
+ multidict==6.0.4
58
+ murmurhash==1.0.9
59
+ networkx==3.1
60
+ numpy==1.25.1
61
+ nvidia-cublas-cu11==11.10.3.66
62
+ nvidia-cuda-cupti-cu11==11.7.101
63
+ nvidia-cuda-nvrtc-cu11==11.7.99
64
+ nvidia-cuda-runtime-cu11==11.7.99
65
+ nvidia-cudnn-cu11==8.5.0.96
66
+ nvidia-cufft-cu11==10.9.0.58
67
+ nvidia-curand-cu11==10.2.10.91
68
+ nvidia-cusolver-cu11==11.4.0.1
69
+ nvidia-cusparse-cu11==11.7.4.91
70
+ nvidia-nccl-cu11==2.14.3
71
+ nvidia-nvtx-cu11==11.7.91
72
+ orjson==3.9.2
73
+ packaging==23.1
74
+ pandas==2.0.3
75
+ pathy==0.10.2
76
+ Pillow==10.0.0
77
+ preshed==3.0.8
78
+ pydantic==1.10.11
79
+ pydantic_core==2.3.0
80
+ pydub==0.25.1
81
+ pyparsing==3.0.9
82
+ python-dateutil==2.8.2
83
+ python-multipart==0.0.6
84
+ pytz==2023.3
85
+ PyYAML==6.0.1
86
+ referencing==0.30.0
87
+ requests==2.31.0
88
+ rpds-py==0.9.2
89
+ scikit-learn==1.3.0
90
+ scipy==1.11.1
91
+ semantic-version==2.10.0
92
+ six==1.16.0
93
+ smart-open==6.3.0
94
+ sniffio==1.3.0
95
+ socksio==1.0.0
96
+ spacy==3.6.0
97
+ spacy-legacy==3.0.12
98
+ spacy-loggers==1.0.4
99
+ srsly==2.4.7
100
+ starlette==0.27.0
101
+ sympy==1.12
102
+ thinc==8.1.10
103
+ threadpoolctl==3.2.0
104
+ toolz==0.12.0
105
+ torch==2.0.1
106
+ torchvision==0.15.2
107
+ tqdm==4.65.0
108
+ triton==2.0.0
109
+ typer==0.9.0
110
+ typing_extensions==4.7.1
111
+ tzdata==2023.3
112
+ uc-micro-py==1.0.2
113
+ urllib3==2.0.4
114
+ uvicorn==0.23.1
115
+ wasabi==1.1.2
116
+ websockets==11.0.3
117
+ yarl==1.9.2
shark_recognizer.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2b905cab6a6a4db828a926ccb175b8e9acdba4f68a48c5c915e30d08f894ed4
3
+ size 87483698