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

first added

Browse files
Files changed (3) hide show
  1. app.py +13 -0
  2. requirements.txt +140 -0
  3. shark_recognizer.pkl +3 -0
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()
requirements.txt ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiofiles==23.1.0
2
+ aiohttp==3.8.4
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
+ blinker==1.4
10
+ blis==0.7.9
11
+ catalogue==2.0.8
12
+ certifi==2023.5.7
13
+ charset-normalizer==3.2.0
14
+ click==8.1.4
15
+ cmake==3.26.4
16
+ command-not-found==0.3
17
+ confection==0.1.0
18
+ contourpy==1.1.0
19
+ cryptography==3.4.8
20
+ cycler==0.11.0
21
+ cymem==2.0.7
22
+ dbus-python==1.2.18
23
+ distlib==0.3.6
24
+ distro==1.7.0
25
+ distro-info===1.1build1
26
+ exceptiongroup==1.1.2
27
+ fastai==2.7.12
28
+ fastapi==0.100.0
29
+ fastcore==1.5.29
30
+ fastdownload==0.0.7
31
+ fastprogress==1.0.3
32
+ ffmpy==0.3.0
33
+ filelock==3.12.2
34
+ fonttools==4.41.0
35
+ frozenlist==1.4.0
36
+ fsspec==2023.6.0
37
+ gradio==3.36.1
38
+ gradio_client==0.2.9
39
+ h11==0.14.0
40
+ httpcore==0.17.3
41
+ httplib2==0.20.2
42
+ httpx==0.24.1
43
+ huggingface-hub==0.16.4
44
+ idna==3.4
45
+ importlib-metadata==4.6.4
46
+ jeepney==0.7.1
47
+ Jinja2==3.1.2
48
+ joblib==1.3.1
49
+ jsonschema==4.18.2
50
+ jsonschema-specifications==2023.6.1
51
+ keyring==23.5.0
52
+ kiwisolver==1.4.4
53
+ langcodes==3.3.0
54
+ launchpadlib==1.10.16
55
+ lazr.restfulclient==0.14.4
56
+ lazr.uri==1.0.6
57
+ linkify-it-py==2.0.2
58
+ lit==16.0.6
59
+ markdown-it-py==2.2.0
60
+ MarkupSafe==2.1.3
61
+ matplotlib==3.7.2
62
+ mdit-py-plugins==0.3.3
63
+ mdurl==0.1.2
64
+ more-itertools==8.10.0
65
+ mpmath==1.3.0
66
+ multidict==6.0.4
67
+ murmurhash==1.0.9
68
+ netifaces==0.11.0
69
+ networkx==3.1
70
+ numpy==1.25.1
71
+ nvidia-cublas-cu11==11.10.3.66
72
+ nvidia-cuda-cupti-cu11==11.7.101
73
+ nvidia-cuda-nvrtc-cu11==11.7.99
74
+ nvidia-cuda-runtime-cu11==11.7.99
75
+ nvidia-cudnn-cu11==8.5.0.96
76
+ nvidia-cufft-cu11==10.9.0.58
77
+ nvidia-curand-cu11==10.2.10.91
78
+ nvidia-cusolver-cu11==11.4.0.1
79
+ nvidia-cusparse-cu11==11.7.4.91
80
+ nvidia-nccl-cu11==2.14.3
81
+ nvidia-nvtx-cu11==11.7.91
82
+ oauthlib==3.2.0
83
+ orjson==3.9.2
84
+ packaging==23.1
85
+ pandas==2.0.3
86
+ pathy==0.10.2
87
+ Pillow==10.0.0
88
+ platformdirs==3.8.1
89
+ preshed==3.0.8
90
+ pydantic==1.10.11
91
+ pydantic_core==2.1.2
92
+ pydub==0.25.1
93
+ Pygments==2.15.1
94
+ PyGObject==3.42.1
95
+ PyJWT==2.3.0
96
+ pyparsing==2.4.7
97
+ python-apt==2.4.0+ubuntu1
98
+ python-dateutil==2.8.2
99
+ python-multipart==0.0.6
100
+ pytz==2023.3
101
+ PyYAML==5.4.1
102
+ referencing==0.29.1
103
+ requests==2.31.0
104
+ rpds-py==0.8.10
105
+ scikit-learn==1.3.0
106
+ scipy==1.11.1
107
+ SecretStorage==3.3.1
108
+ semantic-version==2.10.0
109
+ six==1.16.0
110
+ smart-open==6.3.0
111
+ sniffio==1.3.0
112
+ spacy==3.6.0
113
+ spacy-legacy==3.0.12
114
+ spacy-loggers==1.0.4
115
+ srsly==2.4.6
116
+ starlette==0.27.0
117
+ sympy==1.12
118
+ systemd-python==234
119
+ thinc==8.1.10
120
+ threadpoolctl==3.2.0
121
+ toolz==0.12.0
122
+ torch==2.0.1
123
+ torchvision==0.15.2
124
+ tqdm==4.65.0
125
+ triton==2.0.0
126
+ typer==0.9.0
127
+ typing_extensions==4.7.1
128
+ tzdata==2023.3
129
+ ubuntu-advantage-tools==8001
130
+ uc-micro-py==1.0.2
131
+ ufw==0.36.1
132
+ unattended-upgrades==0.1
133
+ urllib3==2.0.3
134
+ uvicorn==0.22.0
135
+ virtualenv==20.23.1
136
+ wadllib==1.3.6
137
+ wasabi==1.1.2
138
+ websockets==11.0.3
139
+ yarl==1.9.2
140
+ zipp==1.0.0
shark_recognizer.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2b905cab6a6a4db828a926ccb175b8e9acdba4f68a48c5c915e30d08f894ed4
3
+ size 87483698