dr4g0n7ly commited on
Commit
b5e2f48
1 Parent(s): 6259fb7
Files changed (2) hide show
  1. app.ipynb +56 -17
  2. model.pkl +2 -2
app.ipynb CHANGED
@@ -3,7 +3,7 @@
3
  {
4
  "cell_type": "code",
5
  "execution_count": 40,
6
- "id": "c3638940",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
@@ -13,7 +13,7 @@
13
  {
14
  "cell_type": "code",
15
  "execution_count": 44,
16
- "id": "79d0e887",
17
  "metadata": {},
18
  "outputs": [],
19
  "source": [
@@ -28,7 +28,7 @@
28
  {
29
  "cell_type": "code",
30
  "execution_count": 4,
31
- "id": "f4669ec7",
32
  "metadata": {},
33
  "outputs": [
34
  {
@@ -51,7 +51,7 @@
51
  {
52
  "cell_type": "code",
53
  "execution_count": 6,
54
- "id": "09cdb957",
55
  "metadata": {},
56
  "outputs": [],
57
  "source": [
@@ -66,7 +66,7 @@
66
  {
67
  "cell_type": "code",
68
  "execution_count": 27,
69
- "id": "dad80553",
70
  "metadata": {
71
  "scrolled": true
72
  },
@@ -163,7 +163,7 @@
163
  {
164
  "cell_type": "code",
165
  "execution_count": 29,
166
- "id": "f0de21d7",
167
  "metadata": {},
168
  "outputs": [],
169
  "source": [
@@ -176,7 +176,7 @@
176
  {
177
  "cell_type": "code",
178
  "execution_count": 31,
179
- "id": "4424abab",
180
  "metadata": {},
181
  "outputs": [
182
  {
@@ -321,7 +321,7 @@
321
  {
322
  "cell_type": "code",
323
  "execution_count": 34,
324
- "id": "2bf0c23c",
325
  "metadata": {},
326
  "outputs": [
327
  {
@@ -388,7 +388,7 @@
388
  {
389
  "cell_type": "code",
390
  "execution_count": 42,
391
- "id": "80d6199c",
392
  "metadata": {
393
  "scrolled": true
394
  },
@@ -409,19 +409,58 @@
409
  },
410
  {
411
  "cell_type": "code",
412
- "execution_count": 49,
413
- "id": "d5934911",
414
  "metadata": {},
415
  "outputs": [
416
  {
417
- "ename": "TypeError",
418
- "evalue": "__init__() takes 2 positional arguments but 3 were given",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  "output_type": "error",
420
  "traceback": [
421
  "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
422
- "\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
423
- "\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_10308\\3394884428.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mfastai\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvision\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwidgets\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mImageClassifierCleaner\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mcleaner\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mImageClassifierCleaner\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlearn\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mcleaner\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
424
- "\u001b[1;31mTypeError\u001b[0m: __init__() takes 2 positional arguments but 3 were given"
 
 
425
  ]
426
  }
427
  ],
@@ -435,7 +474,7 @@
435
  {
436
  "cell_type": "code",
437
  "execution_count": null,
438
- "id": "c88205d2",
439
  "metadata": {},
440
  "outputs": [],
441
  "source": []
 
3
  {
4
  "cell_type": "code",
5
  "execution_count": 40,
6
+ "id": "bf1f8b04",
7
  "metadata": {},
8
  "outputs": [],
9
  "source": [
 
13
  {
14
  "cell_type": "code",
15
  "execution_count": 44,
16
+ "id": "e2649fec",
17
  "metadata": {},
18
  "outputs": [],
19
  "source": [
 
28
  {
29
  "cell_type": "code",
30
  "execution_count": 4,
31
+ "id": "a3d1e2e7",
32
  "metadata": {},
33
  "outputs": [
34
  {
 
51
  {
52
  "cell_type": "code",
53
  "execution_count": 6,
54
+ "id": "025f7c60",
55
  "metadata": {},
56
  "outputs": [],
57
  "source": [
 
66
  {
67
  "cell_type": "code",
68
  "execution_count": 27,
69
+ "id": "cbf4fbf1",
70
  "metadata": {
71
  "scrolled": true
72
  },
 
163
  {
164
  "cell_type": "code",
165
  "execution_count": 29,
166
+ "id": "d91ab13f",
167
  "metadata": {},
168
  "outputs": [],
169
  "source": [
 
176
  {
177
  "cell_type": "code",
178
  "execution_count": 31,
179
+ "id": "ce2629ab",
180
  "metadata": {},
181
  "outputs": [
182
  {
 
321
  {
322
  "cell_type": "code",
323
  "execution_count": 34,
324
+ "id": "bb72c0de",
325
  "metadata": {},
326
  "outputs": [
327
  {
 
388
  {
389
  "cell_type": "code",
390
  "execution_count": 42,
391
+ "id": "658c0ff8",
392
  "metadata": {
393
  "scrolled": true
394
  },
 
409
  },
410
  {
411
  "cell_type": "code",
412
+ "execution_count": 50,
413
+ "id": "05e42871",
414
  "metadata": {},
415
  "outputs": [
416
  {
417
+ "data": {
418
+ "text/html": [
419
+ "\n",
420
+ "<style>\n",
421
+ " /* Turns off some styling */\n",
422
+ " progress {\n",
423
+ " /* gets rid of default border in Firefox and Opera. */\n",
424
+ " border: none;\n",
425
+ " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
426
+ " background-size: auto;\n",
427
+ " }\n",
428
+ " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
429
+ " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
430
+ " }\n",
431
+ " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
432
+ " background: #F44336;\n",
433
+ " }\n",
434
+ "</style>\n"
435
+ ],
436
+ "text/plain": [
437
+ "<IPython.core.display.HTML object>"
438
+ ]
439
+ },
440
+ "metadata": {},
441
+ "output_type": "display_data"
442
+ },
443
+ {
444
+ "data": {
445
+ "text/html": [],
446
+ "text/plain": [
447
+ "<IPython.core.display.HTML object>"
448
+ ]
449
+ },
450
+ "metadata": {},
451
+ "output_type": "display_data"
452
+ },
453
+ {
454
+ "ename": "ValueError",
455
+ "evalue": "not enough values to unpack (expected 4, got 3)",
456
  "output_type": "error",
457
  "traceback": [
458
  "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
459
+ "\u001b[1;31mValueError\u001b[0m Traceback (most recent call last)",
460
+ "\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_10308\\1566009837.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mfrom\u001b[0m \u001b[0mfastai\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvision\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwidgets\u001b[0m \u001b[1;32mimport\u001b[0m \u001b[0mImageClassifierCleaner\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mcleaner\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mImageClassifierCleaner\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlearn\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mcleaner\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
461
+ "\u001b[1;32mD:\\anaconda3\\lib\\site-packages\\fastai\\vision\\widgets.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, learn, **kwargs)\u001b[0m\n\u001b[0;32m 111\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdd_cats\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mDropdown\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0moptions\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mvocab\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 112\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdd_ds\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mDropdown\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0moptions\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'Train'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'Valid'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 113\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0miwis\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0m_get_iw_info\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlearn\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0m_get_iw_info\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlearn\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 114\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdd_ds\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobserve\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mon_change_ds\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'value'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 115\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdd_cats\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mobserve\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mon_change_ds\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'value'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
462
+ "\u001b[1;32mD:\\anaconda3\\lib\\site-packages\\fastai\\vision\\widgets.py\u001b[0m in \u001b[0;36m_get_iw_info\u001b[1;34m(learn, ds_idx)\u001b[0m\n\u001b[0;32m 98\u001b[0m \u001b[1;34m\"For every image in `dls` `zip` it's `Path`, target and loss\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 99\u001b[0m \u001b[0mdl\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlearn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdls\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mds_idx\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mnew\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mshuffle\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mdrop_last\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 100\u001b[1;33m \u001b[0mprobs\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mtargs\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mpreds\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mlosses\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlearn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_preds\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdl\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mdl\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mwith_input\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mwith_loss\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mwith_decoded\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 101\u001b[0m \u001b[0mtargs\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[0mdl\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mvocab\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mt\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mt\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mtargs\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 102\u001b[0m \u001b[1;32mreturn\u001b[0m \u001b[0mL\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m[\u001b[0m\u001b[0mdl\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdataset\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mitems\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mtargs\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mlosses\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mzip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
463
+ "\u001b[1;31mValueError\u001b[0m: not enough values to unpack (expected 4, got 3)"
464
  ]
465
  }
466
  ],
 
474
  {
475
  "cell_type": "code",
476
  "execution_count": null,
477
+ "id": "81a3823d",
478
  "metadata": {},
479
  "outputs": [],
480
  "source": []
model.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:78fc95416874ae6ba7f84e22ae94535bd6bfc3f59c4e0a649e6ab8c268f6e788
3
- size 46976145
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58a9d914b28120bf0302e9d3f151213d19828c27faba04c9115dfada45039616
3
+ size 47073745