Spaces:
Sleeping
Sleeping
ellenzhangchang
commited on
Commit
•
252e911
1
Parent(s):
59e42ed
fix shape
Browse files
app.ipynb
CHANGED
@@ -2,13 +2,13 @@
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
-
"execution_count":
|
6 |
"id": "initial_id",
|
7 |
"metadata": {
|
8 |
"collapsed": true,
|
9 |
"ExecuteTime": {
|
10 |
-
"end_time": "2024-01-
|
11 |
-
"start_time": "2024-01-
|
12 |
}
|
13 |
},
|
14 |
"outputs": [
|
@@ -16,63 +16,72 @@
|
|
16 |
"name": "stdout",
|
17 |
"output_type": "stream",
|
18 |
"text": [
|
19 |
-
"Requirement already satisfied: pip in /
|
20 |
-
"Requirement already satisfied: gradio in /
|
21 |
-
"Requirement already satisfied: aiofiles<24.0,>=22.0 in /
|
22 |
-
"Requirement already satisfied: altair<6.0,>=4.2.0 in /
|
23 |
-
"Requirement already satisfied: fastapi in /
|
24 |
-
"Requirement already satisfied: ffmpy in /
|
25 |
-
"Requirement already satisfied: gradio-client==0.
|
26 |
-
"Requirement already satisfied: httpx in /
|
27 |
-
"Requirement already satisfied: huggingface-hub>=0.
|
28 |
-
"Requirement already satisfied: importlib-resources<7.0,>=1.3 in /
|
29 |
-
"Requirement already satisfied: jinja2<4.0 in /
|
30 |
-
"Requirement already satisfied: markupsafe~=2.0 in /
|
31 |
-
"Requirement already satisfied: matplotlib~=3.0 in /
|
32 |
-
"Requirement already satisfied: numpy~=1.0 in /
|
33 |
-
"Requirement already satisfied: orjson~=3.0 in /
|
34 |
-
"Requirement already satisfied: packaging in /
|
35 |
-
"Requirement already satisfied: pandas<3.0,>=1.0 in /
|
36 |
-
"Requirement already satisfied: pillow<11.0,>=8.0 in /
|
37 |
-
"Requirement already satisfied: pydantic
|
38 |
-
"Requirement already satisfied: pydub in /
|
39 |
-
"Requirement already satisfied: python-multipart in /
|
40 |
-
"Requirement already satisfied: pyyaml<7.0,>=5.0 in /
|
41 |
-
"Requirement already satisfied:
|
42 |
-
"Requirement already satisfied: semantic-version~=2.0 in /
|
43 |
-
"Requirement already satisfied:
|
44 |
-
"Requirement already satisfied:
|
45 |
-
"Requirement already satisfied:
|
46 |
-
"Requirement already satisfied:
|
47 |
-
"Requirement already satisfied:
|
48 |
-
"Requirement already satisfied:
|
49 |
-
"Requirement already satisfied:
|
50 |
-
"Requirement already satisfied:
|
51 |
-
"Requirement already satisfied:
|
52 |
-
"Requirement already satisfied:
|
53 |
-
"Requirement already satisfied:
|
54 |
-
"Requirement already satisfied:
|
55 |
-
"Requirement already satisfied:
|
56 |
-
"Requirement already satisfied:
|
57 |
-
"Requirement already satisfied:
|
58 |
-
"Requirement already satisfied:
|
59 |
-
"Requirement already satisfied:
|
60 |
-
"Requirement already satisfied:
|
61 |
-
"Requirement already satisfied:
|
62 |
-
"Requirement already satisfied:
|
63 |
-
"Requirement already satisfied:
|
64 |
-
"Requirement already satisfied:
|
65 |
-
"Requirement already satisfied:
|
66 |
-
"Requirement already satisfied:
|
67 |
-
"Requirement already satisfied:
|
68 |
-
"Requirement already satisfied:
|
69 |
-
"Requirement already satisfied:
|
70 |
-
"Requirement already satisfied:
|
71 |
-
"Requirement already satisfied:
|
72 |
-
"Requirement already satisfied:
|
73 |
-
"Requirement already satisfied:
|
74 |
-
"Requirement already satisfied:
|
75 |
-
"Requirement already satisfied:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
]
|
77 |
}
|
78 |
],
|
@@ -91,12 +100,12 @@
|
|
91 |
"metadata": {
|
92 |
"collapsed": false,
|
93 |
"ExecuteTime": {
|
94 |
-
"end_time": "2024-01-
|
95 |
-
"start_time": "2024-01-
|
96 |
}
|
97 |
},
|
98 |
"id": "131cfda07ddd85ac",
|
99 |
-
"execution_count":
|
100 |
},
|
101 |
{
|
102 |
"cell_type": "code",
|
@@ -111,12 +120,12 @@
|
|
111 |
"metadata": {
|
112 |
"collapsed": false,
|
113 |
"ExecuteTime": {
|
114 |
-
"end_time": "2024-01-
|
115 |
-
"start_time": "2024-01-
|
116 |
}
|
117 |
},
|
118 |
"id": "69aefb3580da341f",
|
119 |
-
"execution_count":
|
120 |
},
|
121 |
{
|
122 |
"cell_type": "code",
|
@@ -128,12 +137,12 @@
|
|
128 |
"metadata": {
|
129 |
"collapsed": false,
|
130 |
"ExecuteTime": {
|
131 |
-
"end_time": "2024-01-
|
132 |
-
"start_time": "2024-01-
|
133 |
}
|
134 |
},
|
135 |
"id": "65a607022a16cd59",
|
136 |
-
"execution_count":
|
137 |
},
|
138 |
{
|
139 |
"cell_type": "code",
|
@@ -149,19 +158,19 @@
|
|
149 |
"metadata": {
|
150 |
"collapsed": false,
|
151 |
"ExecuteTime": {
|
152 |
-
"end_time": "2024-01-
|
153 |
-
"start_time": "2024-01-
|
154 |
}
|
155 |
},
|
156 |
"id": "5d718a1ff473d36f",
|
157 |
-
"execution_count":
|
158 |
},
|
159 |
{
|
160 |
"cell_type": "code",
|
161 |
"outputs": [],
|
162 |
"source": [
|
163 |
"#|export\n",
|
164 |
-
"image = gr.Image(
|
165 |
"label = gr.Label()\n",
|
166 |
"examples = [\n",
|
167 |
" ['images/grizzly.png'],\n",
|
@@ -172,12 +181,12 @@
|
|
172 |
"metadata": {
|
173 |
"collapsed": false,
|
174 |
"ExecuteTime": {
|
175 |
-
"end_time": "2024-01-
|
176 |
-
"start_time": "2024-01-
|
177 |
}
|
178 |
},
|
179 |
"id": "f3eb492b280e1353",
|
180 |
-
"execution_count":
|
181 |
},
|
182 |
{
|
183 |
"cell_type": "code",
|
@@ -186,7 +195,7 @@
|
|
186 |
"name": "stdout",
|
187 |
"output_type": "stream",
|
188 |
"text": [
|
189 |
-
"Running on local URL: http://127.0.0.1:
|
190 |
"\n",
|
191 |
"To create a public link, set `share=True` in `launch()`.\n"
|
192 |
]
|
@@ -194,7 +203,7 @@
|
|
194 |
{
|
195 |
"data": {
|
196 |
"text/plain": "<IPython.core.display.HTML object>",
|
197 |
-
"text/html": "<div><iframe src=\"http://127.0.0.1:
|
198 |
},
|
199 |
"metadata": {},
|
200 |
"output_type": "display_data"
|
@@ -203,7 +212,7 @@
|
|
203 |
"data": {
|
204 |
"text/plain": ""
|
205 |
},
|
206 |
-
"execution_count":
|
207 |
"metadata": {},
|
208 |
"output_type": "execute_result"
|
209 |
}
|
@@ -215,12 +224,12 @@
|
|
215 |
"metadata": {
|
216 |
"collapsed": false,
|
217 |
"ExecuteTime": {
|
218 |
-
"end_time": "2024-01-
|
219 |
-
"start_time": "2024-01-
|
220 |
}
|
221 |
},
|
222 |
"id": "2f43279622f0bad4",
|
223 |
-
"execution_count":
|
224 |
},
|
225 |
{
|
226 |
"cell_type": "code",
|
@@ -229,105 +238,56 @@
|
|
229 |
"name": "stdout",
|
230 |
"output_type": "stream",
|
231 |
"text": [
|
232 |
-
"
|
233 |
-
"
|
234 |
-
"Requirement already satisfied:
|
235 |
-
"Requirement already satisfied:
|
236 |
-
"
|
237 |
-
"
|
238 |
-
"
|
239 |
-
"
|
240 |
-
"
|
241 |
-
"
|
242 |
-
"
|
243 |
-
"
|
244 |
-
"Requirement already satisfied:
|
245 |
-
"Requirement already satisfied:
|
246 |
-
"Requirement already satisfied:
|
247 |
-
"Requirement already satisfied:
|
248 |
-
"Requirement already satisfied:
|
249 |
-
"Requirement already satisfied:
|
250 |
-
"Requirement already satisfied:
|
251 |
-
"Requirement already satisfied:
|
252 |
-
"Requirement already satisfied:
|
253 |
-
"Requirement already satisfied:
|
254 |
-
"Requirement already satisfied:
|
255 |
-
"Requirement already satisfied:
|
256 |
-
"Requirement already satisfied:
|
257 |
-
"Requirement already satisfied:
|
258 |
-
"Requirement already satisfied:
|
259 |
-
"Requirement already satisfied:
|
260 |
-
"Requirement already satisfied:
|
261 |
-
"Requirement already satisfied:
|
262 |
-
"Requirement already satisfied:
|
263 |
-
"Requirement already satisfied:
|
264 |
-
"Requirement already satisfied: tornado>=6.
|
265 |
-
"Requirement already satisfied:
|
266 |
-
"Requirement already satisfied:
|
267 |
-
"Requirement already satisfied:
|
268 |
-
"Requirement already satisfied:
|
269 |
-
"Requirement already satisfied:
|
270 |
-
"Requirement already satisfied:
|
271 |
-
"Requirement already satisfied:
|
272 |
-
"Requirement already satisfied:
|
273 |
-
"Requirement already satisfied:
|
274 |
-
"Requirement already satisfied:
|
275 |
-
"Requirement already satisfied:
|
276 |
-
"Requirement already satisfied:
|
277 |
-
"Requirement already satisfied:
|
278 |
-
"
|
279 |
-
"
|
280 |
-
"
|
281 |
-
"
|
282 |
-
"Requirement already satisfied: terminado>=0.8.3 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.18.0)\r\n",
|
283 |
-
"Requirement already satisfied: websocket-client in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.7.0)\r\n",
|
284 |
-
"Requirement already satisfied: async-lru>=1.0.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.0.4)\r\n",
|
285 |
-
"Requirement already satisfied: ipykernel in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (6.29.0)\r\n",
|
286 |
-
"Requirement already satisfied: jupyter-lsp>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.2.2)\r\n",
|
287 |
-
"Requirement already satisfied: babel>=2.10 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.14.0)\r\n",
|
288 |
-
"Requirement already satisfied: json5>=0.9.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.9.14)\r\n",
|
289 |
-
"Requirement already satisfied: jsonschema>=4.18.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (4.21.1)\r\n",
|
290 |
-
"Requirement already satisfied: requests>=2.31 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.31.0)\r\n",
|
291 |
-
"Requirement already satisfied: idna>=2.8 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (3.4)\r\n",
|
292 |
-
"Requirement already satisfied: sniffio>=1.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.3.0)\r\n",
|
293 |
-
"Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jinja2->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.1.2)\r\n",
|
294 |
-
"Requirement already satisfied: attrs>=22.2.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (23.2.0)\r\n",
|
295 |
-
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2023.12.1)\r\n",
|
296 |
-
"Requirement already satisfied: referencing>=0.28.4 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.33.0)\r\n",
|
297 |
-
"Requirement already satisfied: rpds-py>=0.7.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.17.1)\r\n",
|
298 |
-
"Requirement already satisfied: python-dateutil>=2.8.2 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-client>=7.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.8.2)\r\n",
|
299 |
-
"Requirement already satisfied: platformdirs>=2.5 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-core!=5.0.*,>=4.12->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (4.2.0)\r\n",
|
300 |
-
"Requirement already satisfied: python-json-logger>=2.0.4 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.0.7)\r\n",
|
301 |
-
"Requirement already satisfied: rfc3339-validator in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.1.4)\r\n",
|
302 |
-
"Requirement already satisfied: rfc3986-validator>=0.1.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.1.1)\r\n",
|
303 |
-
"Requirement already satisfied: beautifulsoup4 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (4.12.3)\r\n",
|
304 |
-
"Requirement already satisfied: bleach!=5.0.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (6.1.0)\r\n",
|
305 |
-
"Requirement already satisfied: defusedxml in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.7.1)\r\n",
|
306 |
-
"Requirement already satisfied: jupyterlab-pygments in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.3.0)\r\n",
|
307 |
-
"Requirement already satisfied: mistune<4,>=2.0.3 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (3.0.2)\r\n",
|
308 |
-
"Requirement already satisfied: nbclient>=0.5.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.9.0)\r\n",
|
309 |
-
"Requirement already satisfied: pandocfilters>=1.4.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.5.1)\r\n",
|
310 |
-
"Requirement already satisfied: tinycss2 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.2.1)\r\n",
|
311 |
-
"Requirement already satisfied: fastjsonschema in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from nbformat>=5.3.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.19.1)\r\n",
|
312 |
-
"Requirement already satisfied: charset-normalizer<4,>=2 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from requests>=2.31->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (3.1.0)\r\n",
|
313 |
-
"Requirement already satisfied: urllib3<3,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from requests>=2.31->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.0.2)\r\n",
|
314 |
-
"Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from requests>=2.31->jupyterlab-server<3,>=2.22.1->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2023.5.7)\r\n",
|
315 |
-
"Requirement already satisfied: argon2-cffi-bindings in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from argon2-cffi->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (21.2.0)\r\n",
|
316 |
-
"Requirement already satisfied: appnope in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from ipykernel->jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.1.3)\r\n",
|
317 |
-
"Requirement already satisfied: debugpy>=1.6.5 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from ipykernel->jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.8.0)\r\n",
|
318 |
-
"Requirement already satisfied: nest-asyncio in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from ipykernel->jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.6.0)\r\n",
|
319 |
-
"Requirement already satisfied: psutil in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from ipykernel->jupyterlab<5,>=4.0.2->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (5.9.5)\r\n",
|
320 |
-
"Requirement already satisfied: webencodings in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (0.5.1)\r\n",
|
321 |
-
"Requirement already satisfied: fqdn in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.5.1)\r\n",
|
322 |
-
"Requirement already satisfied: isoduration in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (20.11.0)\r\n",
|
323 |
-
"Requirement already satisfied: jsonpointer>1.13 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.4)\r\n",
|
324 |
-
"Requirement already satisfied: uri-template in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.3.0)\r\n",
|
325 |
-
"Requirement already satisfied: webcolors>=1.11 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.13)\r\n",
|
326 |
-
"Requirement already satisfied: cffi>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.16.0)\r\n",
|
327 |
-
"Requirement already satisfied: soupsieve>1.2 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.5)\r\n",
|
328 |
-
"Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.21)\r\n",
|
329 |
-
"Requirement already satisfied: arrow>=0.15.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (1.3.0)\r\n",
|
330 |
-
"Requirement already satisfied: types-python-dateutil>=2.8.10 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->notebook>=4.4.1->widgetsnbextension~=3.6.6->ipywidgets<=8.0.4->nbdev) (2.8.19.20240106)\r\n"
|
331 |
]
|
332 |
}
|
333 |
],
|
@@ -337,12 +297,12 @@
|
|
337 |
"metadata": {
|
338 |
"collapsed": false,
|
339 |
"ExecuteTime": {
|
340 |
-
"end_time": "2024-01-
|
341 |
-
"start_time": "2024-01-
|
342 |
}
|
343 |
},
|
344 |
"id": "876b397b80c82dd",
|
345 |
-
"execution_count":
|
346 |
},
|
347 |
{
|
348 |
"cell_type": "code",
|
@@ -353,12 +313,12 @@
|
|
353 |
"metadata": {
|
354 |
"collapsed": false,
|
355 |
"ExecuteTime": {
|
356 |
-
"end_time": "2024-01-
|
357 |
-
"start_time": "2024-01-
|
358 |
}
|
359 |
},
|
360 |
"id": "a6999db4bdd9fc11",
|
361 |
-
"execution_count":
|
362 |
},
|
363 |
{
|
364 |
"cell_type": "code",
|
@@ -378,12 +338,12 @@
|
|
378 |
"metadata": {
|
379 |
"collapsed": false,
|
380 |
"ExecuteTime": {
|
381 |
-
"end_time": "2024-01-
|
382 |
-
"start_time": "2024-01-
|
383 |
}
|
384 |
},
|
385 |
"id": "4b9a6222130c5222",
|
386 |
-
"execution_count":
|
387 |
},
|
388 |
{
|
389 |
"cell_type": "code",
|
@@ -392,12 +352,12 @@
|
|
392 |
"metadata": {
|
393 |
"collapsed": false,
|
394 |
"ExecuteTime": {
|
395 |
-
"end_time": "2024-01-
|
396 |
-
"start_time": "2024-01-
|
397 |
}
|
398 |
},
|
399 |
"id": "a163ce5fbeb88c1f",
|
400 |
-
"execution_count":
|
401 |
}
|
402 |
],
|
403 |
"metadata": {
|
|
|
2 |
"cells": [
|
3 |
{
|
4 |
"cell_type": "code",
|
5 |
+
"execution_count": 2,
|
6 |
"id": "initial_id",
|
7 |
"metadata": {
|
8 |
"collapsed": true,
|
9 |
"ExecuteTime": {
|
10 |
+
"end_time": "2024-01-31T13:17:32.853174Z",
|
11 |
+
"start_time": "2024-01-31T13:17:26.201882Z"
|
12 |
}
|
13 |
},
|
14 |
"outputs": [
|
|
|
16 |
"name": "stdout",
|
17 |
"output_type": "stream",
|
18 |
"text": [
|
19 |
+
"Requirement already satisfied: pip in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (23.3.2)\r\n",
|
20 |
+
"Requirement already satisfied: gradio in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (4.16.0)\r\n",
|
21 |
+
"Requirement already satisfied: aiofiles<24.0,>=22.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (23.2.1)\r\n",
|
22 |
+
"Requirement already satisfied: altair<6.0,>=4.2.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (5.2.0)\r\n",
|
23 |
+
"Requirement already satisfied: fastapi in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.109.0)\r\n",
|
24 |
+
"Requirement already satisfied: ffmpy in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.3.1)\r\n",
|
25 |
+
"Requirement already satisfied: gradio-client==0.8.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.8.1)\r\n",
|
26 |
+
"Requirement already satisfied: httpx in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.26.0)\r\n",
|
27 |
+
"Requirement already satisfied: huggingface-hub>=0.19.3 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.20.3)\r\n",
|
28 |
+
"Requirement already satisfied: importlib-resources<7.0,>=1.3 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (6.1.1)\r\n",
|
29 |
+
"Requirement already satisfied: jinja2<4.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (3.1.2)\r\n",
|
30 |
+
"Requirement already satisfied: markupsafe~=2.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (2.1.3)\r\n",
|
31 |
+
"Requirement already satisfied: matplotlib~=3.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (3.8.2)\r\n",
|
32 |
+
"Requirement already satisfied: numpy~=1.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (1.26.3)\r\n",
|
33 |
+
"Requirement already satisfied: orjson~=3.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (3.9.12)\r\n",
|
34 |
+
"Requirement already satisfied: packaging in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (23.1)\r\n",
|
35 |
+
"Requirement already satisfied: pandas<3.0,>=1.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (2.2.0)\r\n",
|
36 |
+
"Requirement already satisfied: pillow<11.0,>=8.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (10.2.0)\r\n",
|
37 |
+
"Requirement already satisfied: pydantic>=2.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (2.6.0)\r\n",
|
38 |
+
"Requirement already satisfied: pydub in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.25.1)\r\n",
|
39 |
+
"Requirement already satisfied: python-multipart in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.0.6)\r\n",
|
40 |
+
"Requirement already satisfied: pyyaml<7.0,>=5.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (6.0.1)\r\n",
|
41 |
+
"Requirement already satisfied: ruff>=0.1.7 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.1.15)\r\n",
|
42 |
+
"Requirement already satisfied: semantic-version~=2.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (2.10.0)\r\n",
|
43 |
+
"Requirement already satisfied: tomlkit==0.12.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.12.0)\r\n",
|
44 |
+
"Requirement already satisfied: typer<1.0,>=0.9 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from typer[all]<1.0,>=0.9->gradio) (0.9.0)\r\n",
|
45 |
+
"Requirement already satisfied: typing-extensions~=4.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (4.9.0)\r\n",
|
46 |
+
"Requirement already satisfied: uvicorn>=0.14.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio) (0.27.0.post1)\r\n",
|
47 |
+
"Requirement already satisfied: fsspec in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio-client==0.8.1->gradio) (2023.12.2)\r\n",
|
48 |
+
"Requirement already satisfied: websockets<12.0,>=10.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from gradio-client==0.8.1->gradio) (11.0.3)\r\n",
|
49 |
+
"Requirement already satisfied: jsonschema>=3.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from altair<6.0,>=4.2.0->gradio) (4.19.2)\r\n",
|
50 |
+
"Requirement already satisfied: toolz in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from altair<6.0,>=4.2.0->gradio) (0.12.1)\r\n",
|
51 |
+
"Requirement already satisfied: filelock in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from huggingface-hub>=0.19.3->gradio) (3.13.1)\r\n",
|
52 |
+
"Requirement already satisfied: requests in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from huggingface-hub>=0.19.3->gradio) (2.31.0)\r\n",
|
53 |
+
"Requirement already satisfied: tqdm>=4.42.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from huggingface-hub>=0.19.3->gradio) (4.66.1)\r\n",
|
54 |
+
"Requirement already satisfied: contourpy>=1.0.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (1.2.0)\r\n",
|
55 |
+
"Requirement already satisfied: cycler>=0.10 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (0.12.1)\r\n",
|
56 |
+
"Requirement already satisfied: fonttools>=4.22.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (4.47.2)\r\n",
|
57 |
+
"Requirement already satisfied: kiwisolver>=1.3.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (1.4.5)\r\n",
|
58 |
+
"Requirement already satisfied: pyparsing>=2.3.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (3.1.1)\r\n",
|
59 |
+
"Requirement already satisfied: python-dateutil>=2.7 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from matplotlib~=3.0->gradio) (2.8.2)\r\n",
|
60 |
+
"Requirement already satisfied: pytz>=2020.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3.post1)\r\n",
|
61 |
+
"Requirement already satisfied: tzdata>=2022.7 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from pandas<3.0,>=1.0->gradio) (2023.4)\r\n",
|
62 |
+
"Requirement already satisfied: annotated-types>=0.4.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from pydantic>=2.0->gradio) (0.6.0)\r\n",
|
63 |
+
"Requirement already satisfied: pydantic-core==2.16.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from pydantic>=2.0->gradio) (2.16.1)\r\n",
|
64 |
+
"Requirement already satisfied: click<9.0.0,>=7.1.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from typer<1.0,>=0.9->typer[all]<1.0,>=0.9->gradio) (8.1.7)\r\n",
|
65 |
+
"Requirement already satisfied: colorama<0.5.0,>=0.4.3 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from typer[all]<1.0,>=0.9->gradio) (0.4.6)\r\n",
|
66 |
+
"Requirement already satisfied: shellingham<2.0.0,>=1.3.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from typer[all]<1.0,>=0.9->gradio) (1.5.4)\r\n",
|
67 |
+
"Requirement already satisfied: rich<14.0.0,>=10.11.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from typer[all]<1.0,>=0.9->gradio) (13.7.0)\r\n",
|
68 |
+
"Requirement already satisfied: h11>=0.8 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from uvicorn>=0.14.0->gradio) (0.14.0)\r\n",
|
69 |
+
"Requirement already satisfied: starlette<0.36.0,>=0.35.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from fastapi->gradio) (0.35.1)\r\n",
|
70 |
+
"Requirement already satisfied: anyio in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from httpx->gradio) (4.2.0)\r\n",
|
71 |
+
"Requirement already satisfied: certifi in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from httpx->gradio) (2023.11.17)\r\n",
|
72 |
+
"Requirement already satisfied: httpcore==1.* in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from httpx->gradio) (1.0.2)\r\n",
|
73 |
+
"Requirement already satisfied: idna in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from httpx->gradio) (3.4)\r\n",
|
74 |
+
"Requirement already satisfied: sniffio in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from httpx->gradio) (1.3.0)\r\n",
|
75 |
+
"Requirement already satisfied: attrs>=22.2.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)\r\n",
|
76 |
+
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.7.1)\r\n",
|
77 |
+
"Requirement already satisfied: referencing>=0.28.4 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.30.2)\r\n",
|
78 |
+
"Requirement already satisfied: rpds-py>=0.7.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.10.6)\r\n",
|
79 |
+
"Requirement already satisfied: six>=1.5 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)\r\n",
|
80 |
+
"Requirement already satisfied: markdown-it-py>=2.2.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from rich<14.0.0,>=10.11.0->typer[all]<1.0,>=0.9->gradio) (3.0.0)\r\n",
|
81 |
+
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from rich<14.0.0,>=10.11.0->typer[all]<1.0,>=0.9->gradio) (2.15.1)\r\n",
|
82 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from requests->huggingface-hub>=0.19.3->gradio) (2.0.4)\r\n",
|
83 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from requests->huggingface-hub>=0.19.3->gradio) (1.26.18)\r\n",
|
84 |
+
"Requirement already satisfied: mdurl~=0.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich<14.0.0,>=10.11.0->typer[all]<1.0,>=0.9->gradio) (0.1.2)\r\n"
|
85 |
]
|
86 |
}
|
87 |
],
|
|
|
100 |
"metadata": {
|
101 |
"collapsed": false,
|
102 |
"ExecuteTime": {
|
103 |
+
"end_time": "2024-01-31T13:17:32.866781Z",
|
104 |
+
"start_time": "2024-01-31T13:17:32.853554Z"
|
105 |
}
|
106 |
},
|
107 |
"id": "131cfda07ddd85ac",
|
108 |
+
"execution_count": 3
|
109 |
},
|
110 |
{
|
111 |
"cell_type": "code",
|
|
|
120 |
"metadata": {
|
121 |
"collapsed": false,
|
122 |
"ExecuteTime": {
|
123 |
+
"end_time": "2024-01-31T13:17:48.186611Z",
|
124 |
+
"start_time": "2024-01-31T13:17:32.857277Z"
|
125 |
}
|
126 |
},
|
127 |
"id": "69aefb3580da341f",
|
128 |
+
"execution_count": 4
|
129 |
},
|
130 |
{
|
131 |
"cell_type": "code",
|
|
|
137 |
"metadata": {
|
138 |
"collapsed": false,
|
139 |
"ExecuteTime": {
|
140 |
+
"end_time": "2024-01-31T13:17:48.208712Z",
|
141 |
+
"start_time": "2024-01-31T13:17:48.188919Z"
|
142 |
}
|
143 |
},
|
144 |
"id": "65a607022a16cd59",
|
145 |
+
"execution_count": 5
|
146 |
},
|
147 |
{
|
148 |
"cell_type": "code",
|
|
|
158 |
"metadata": {
|
159 |
"collapsed": false,
|
160 |
"ExecuteTime": {
|
161 |
+
"end_time": "2024-01-31T13:17:48.218289Z",
|
162 |
+
"start_time": "2024-01-31T13:17:48.210181Z"
|
163 |
}
|
164 |
},
|
165 |
"id": "5d718a1ff473d36f",
|
166 |
+
"execution_count": 6
|
167 |
},
|
168 |
{
|
169 |
"cell_type": "code",
|
170 |
"outputs": [],
|
171 |
"source": [
|
172 |
"#|export\n",
|
173 |
+
"image = gr.Image(width=224, height=224)\n",
|
174 |
"label = gr.Label()\n",
|
175 |
"examples = [\n",
|
176 |
" ['images/grizzly.png'],\n",
|
|
|
181 |
"metadata": {
|
182 |
"collapsed": false,
|
183 |
"ExecuteTime": {
|
184 |
+
"end_time": "2024-01-31T13:17:48.218664Z",
|
185 |
+
"start_time": "2024-01-31T13:17:48.212792Z"
|
186 |
}
|
187 |
},
|
188 |
"id": "f3eb492b280e1353",
|
189 |
+
"execution_count": 7
|
190 |
},
|
191 |
{
|
192 |
"cell_type": "code",
|
|
|
195 |
"name": "stdout",
|
196 |
"output_type": "stream",
|
197 |
"text": [
|
198 |
+
"Running on local URL: http://127.0.0.1:7860\n",
|
199 |
"\n",
|
200 |
"To create a public link, set `share=True` in `launch()`.\n"
|
201 |
]
|
|
|
203 |
{
|
204 |
"data": {
|
205 |
"text/plain": "<IPython.core.display.HTML object>",
|
206 |
+
"text/html": "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
207 |
},
|
208 |
"metadata": {},
|
209 |
"output_type": "display_data"
|
|
|
212 |
"data": {
|
213 |
"text/plain": ""
|
214 |
},
|
215 |
+
"execution_count": 8,
|
216 |
"metadata": {},
|
217 |
"output_type": "execute_result"
|
218 |
}
|
|
|
224 |
"metadata": {
|
225 |
"collapsed": false,
|
226 |
"ExecuteTime": {
|
227 |
+
"end_time": "2024-01-31T13:17:48.327783Z",
|
228 |
+
"start_time": "2024-01-31T13:17:48.217419Z"
|
229 |
}
|
230 |
},
|
231 |
"id": "2f43279622f0bad4",
|
232 |
+
"execution_count": 8
|
233 |
},
|
234 |
{
|
235 |
"cell_type": "code",
|
|
|
238 |
"name": "stdout",
|
239 |
"output_type": "stream",
|
240 |
"text": [
|
241 |
+
"Collecting nbdev\r\n",
|
242 |
+
" Using cached nbdev-2.3.13-py3-none-any.whl.metadata (10 kB)\r\n",
|
243 |
+
"Requirement already satisfied: ipywidgets<=8.0.4 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from nbdev) (8.0.4)\r\n",
|
244 |
+
"Requirement already satisfied: fastcore>=1.5.27 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from nbdev) (1.5.29)\r\n",
|
245 |
+
"Collecting execnb>=0.1.4 (from nbdev)\r\n",
|
246 |
+
" Using cached execnb-0.1.5-py3-none-any.whl (13 kB)\r\n",
|
247 |
+
"Collecting astunparse (from nbdev)\r\n",
|
248 |
+
" Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)\r\n",
|
249 |
+
"Collecting ghapi>=1.0.3 (from nbdev)\r\n",
|
250 |
+
" Using cached ghapi-1.0.4-py3-none-any.whl.metadata (13 kB)\r\n",
|
251 |
+
"Collecting watchdog (from nbdev)\r\n",
|
252 |
+
" Using cached watchdog-3.0.0-cp311-cp311-macosx_11_0_arm64.whl (91 kB)\r\n",
|
253 |
+
"Requirement already satisfied: asttokens in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from nbdev) (2.0.5)\r\n",
|
254 |
+
"Requirement already satisfied: PyYAML in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from nbdev) (6.0.1)\r\n",
|
255 |
+
"Requirement already satisfied: ipython in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from execnb>=0.1.4->nbdev) (8.20.0)\r\n",
|
256 |
+
"Requirement already satisfied: pip in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from fastcore>=1.5.27->nbdev) (23.3.2)\r\n",
|
257 |
+
"Requirement already satisfied: packaging in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from fastcore>=1.5.27->nbdev) (23.1)\r\n",
|
258 |
+
"Requirement already satisfied: ipykernel>=4.5.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipywidgets<=8.0.4->nbdev) (6.28.0)\r\n",
|
259 |
+
"Requirement already satisfied: traitlets>=4.3.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipywidgets<=8.0.4->nbdev) (5.7.1)\r\n",
|
260 |
+
"Requirement already satisfied: widgetsnbextension~=4.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipywidgets<=8.0.4->nbdev) (4.0.5)\r\n",
|
261 |
+
"Requirement already satisfied: jupyterlab-widgets~=3.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipywidgets<=8.0.4->nbdev) (3.0.9)\r\n",
|
262 |
+
"Requirement already satisfied: six in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from asttokens->nbdev) (1.16.0)\r\n",
|
263 |
+
"Requirement already satisfied: wheel<1.0,>=0.23.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from astunparse->nbdev) (0.41.2)\r\n",
|
264 |
+
"Requirement already satisfied: appnope in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (0.1.2)\r\n",
|
265 |
+
"Requirement already satisfied: comm>=0.1.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (0.1.2)\r\n",
|
266 |
+
"Requirement already satisfied: debugpy>=1.6.5 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (1.6.7)\r\n",
|
267 |
+
"Requirement already satisfied: jupyter-client>=6.1.12 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (8.6.0)\r\n",
|
268 |
+
"Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (5.5.0)\r\n",
|
269 |
+
"Requirement already satisfied: matplotlib-inline>=0.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (0.1.6)\r\n",
|
270 |
+
"Requirement already satisfied: nest-asyncio in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (1.5.6)\r\n",
|
271 |
+
"Requirement already satisfied: psutil in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (5.9.0)\r\n",
|
272 |
+
"Requirement already satisfied: pyzmq>=24 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (25.1.2)\r\n",
|
273 |
+
"Requirement already satisfied: tornado>=6.1 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (6.3.3)\r\n",
|
274 |
+
"Requirement already satisfied: decorator in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipython->execnb>=0.1.4->nbdev) (5.1.1)\r\n",
|
275 |
+
"Requirement already satisfied: jedi>=0.16 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipython->execnb>=0.1.4->nbdev) (0.18.1)\r\n",
|
276 |
+
"Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipython->execnb>=0.1.4->nbdev) (3.0.43)\r\n",
|
277 |
+
"Requirement already satisfied: pygments>=2.4.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipython->execnb>=0.1.4->nbdev) (2.15.1)\r\n",
|
278 |
+
"Requirement already satisfied: stack-data in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipython->execnb>=0.1.4->nbdev) (0.2.0)\r\n",
|
279 |
+
"Requirement already satisfied: pexpect>4.3 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from ipython->execnb>=0.1.4->nbdev) (4.8.0)\r\n",
|
280 |
+
"Requirement already satisfied: parso<0.9.0,>=0.8.0 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jedi>=0.16->ipython->execnb>=0.1.4->nbdev) (0.8.3)\r\n",
|
281 |
+
"Requirement already satisfied: python-dateutil>=2.8.2 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (2.8.2)\r\n",
|
282 |
+
"Requirement already satisfied: platformdirs>=2.5 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from jupyter-core!=5.0.*,>=4.12->ipykernel>=4.5.1->ipywidgets<=8.0.4->nbdev) (3.10.0)\r\n",
|
283 |
+
"Requirement already satisfied: ptyprocess>=0.5 in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from pexpect>4.3->ipython->execnb>=0.1.4->nbdev) (0.7.0)\r\n",
|
284 |
+
"Requirement already satisfied: wcwidth in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython->execnb>=0.1.4->nbdev) (0.2.5)\r\n",
|
285 |
+
"Requirement already satisfied: executing in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from stack-data->ipython->execnb>=0.1.4->nbdev) (0.8.3)\r\n",
|
286 |
+
"Requirement already satisfied: pure-eval in /Users/ellen/miniconda3/envs/minima/lib/python3.11/site-packages (from stack-data->ipython->execnb>=0.1.4->nbdev) (0.2.2)\r\n",
|
287 |
+
"Using cached nbdev-2.3.13-py3-none-any.whl (66 kB)\r\n",
|
288 |
+
"Using cached ghapi-1.0.4-py3-none-any.whl (58 kB)\r\n",
|
289 |
+
"Installing collected packages: watchdog, astunparse, ghapi, execnb, nbdev\r\n",
|
290 |
+
"Successfully installed astunparse-1.6.3 execnb-0.1.5 ghapi-1.0.4 nbdev-2.3.13 watchdog-3.0.0\r\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
]
|
292 |
}
|
293 |
],
|
|
|
297 |
"metadata": {
|
298 |
"collapsed": false,
|
299 |
"ExecuteTime": {
|
300 |
+
"end_time": "2024-01-31T13:17:50.062123Z",
|
301 |
+
"start_time": "2024-01-31T13:17:48.339494Z"
|
302 |
}
|
303 |
},
|
304 |
"id": "876b397b80c82dd",
|
305 |
+
"execution_count": 9
|
306 |
},
|
307 |
{
|
308 |
"cell_type": "code",
|
|
|
313 |
"metadata": {
|
314 |
"collapsed": false,
|
315 |
"ExecuteTime": {
|
316 |
+
"end_time": "2024-01-31T13:17:50.149378Z",
|
317 |
+
"start_time": "2024-01-31T13:17:50.064748Z"
|
318 |
}
|
319 |
},
|
320 |
"id": "a6999db4bdd9fc11",
|
321 |
+
"execution_count": 10
|
322 |
},
|
323 |
{
|
324 |
"cell_type": "code",
|
|
|
338 |
"metadata": {
|
339 |
"collapsed": false,
|
340 |
"ExecuteTime": {
|
341 |
+
"end_time": "2024-01-31T13:17:50.154880Z",
|
342 |
+
"start_time": "2024-01-31T13:17:50.149782Z"
|
343 |
}
|
344 |
},
|
345 |
"id": "4b9a6222130c5222",
|
346 |
+
"execution_count": 11
|
347 |
},
|
348 |
{
|
349 |
"cell_type": "code",
|
|
|
352 |
"metadata": {
|
353 |
"collapsed": false,
|
354 |
"ExecuteTime": {
|
355 |
+
"end_time": "2024-01-31T13:17:50.160011Z",
|
356 |
+
"start_time": "2024-01-31T13:17:50.155060Z"
|
357 |
}
|
358 |
},
|
359 |
"id": "a163ce5fbeb88c1f",
|
360 |
+
"execution_count": 11
|
361 |
}
|
362 |
],
|
363 |
"metadata": {
|
app.py
CHANGED
@@ -20,7 +20,7 @@ def classify_image(img):
|
|
20 |
return dict(zip(categories, map(float, probs)))
|
21 |
|
22 |
# %% app.ipynb 5
|
23 |
-
image = gr.Image(
|
24 |
label = gr.Label()
|
25 |
examples = [
|
26 |
['images/grizzly.png'],
|
|
|
20 |
return dict(zip(categories, map(float, probs)))
|
21 |
|
22 |
# %% app.ipynb 5
|
23 |
+
image = gr.Image(width=224, height=224)
|
24 |
label = gr.Label()
|
25 |
examples = [
|
26 |
['images/grizzly.png'],
|