Héctor Tarrido-Picart commited on
Commit
d1eadee
·
1 Parent(s): f8c857a

updated model

Browse files
Files changed (3) hide show
  1. app.py +2 -3
  2. model.pkl +2 -2
  3. powerline app.ipynb +11 -309
app.py CHANGED
@@ -4,9 +4,8 @@ import skimage
4
 
5
  learn = load_learner('model.pkl')
6
 
7
- categories = ['power line down',
8
- 'power line arcing',
9
- 'palm tree after hurricane']
10
 
11
  def predict(img):
12
  img = PILImage.create(img)
 
4
 
5
  learn = load_learner('model.pkl')
6
 
7
+ categories = ['power line down after storm',
8
+ 'tree down on power line']
 
9
 
10
  def predict(img):
11
  img = PILImage.create(img)
model.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dfe05575ec947c1345d83808c70c04029534976514e44eff13c15d0fd7051e37
3
- size 46958501
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68920b546aabf64efcf72a90b44915d394a33c2c14058c4169da2082c48dcecb
3
+ size 46960593
powerline app.ipynb CHANGED
@@ -20,7 +20,7 @@
20
  },
21
  {
22
  "cell_type": "code",
23
- "execution_count": 1,
24
  "id": "3f54ef95",
25
  "metadata": {},
26
  "outputs": [],
@@ -33,7 +33,7 @@
33
  },
34
  {
35
  "cell_type": "code",
36
- "execution_count": 2,
37
  "id": "d25179ca",
38
  "metadata": {},
39
  "outputs": [],
@@ -44,15 +44,14 @@
44
  },
45
  {
46
  "cell_type": "code",
47
- "execution_count": 6,
48
  "id": "d752f05b",
49
  "metadata": {},
50
  "outputs": [],
51
  "source": [
52
  "#|export\n",
53
- "categories = ['power line down',\n",
54
- " 'power line arcing',\n",
55
- " 'palm tree after hurricane']\n",
56
  "\n",
57
  "def predict(img):\n",
58
  " img = PILImage.create(img)\n",
@@ -62,7 +61,7 @@
62
  },
63
  {
64
  "cell_type": "code",
65
- "execution_count": 7,
66
  "id": "80d55893",
67
  "metadata": {
68
  "scrolled": false
@@ -88,16 +87,15 @@
88
  "name": "stdout",
89
  "output_type": "stream",
90
  "text": [
91
- "Running on local URL: http://127.0.0.1:7862\n",
92
- "Running on public URL: https://93aea332a0c30fbbd1.gradio.live\n",
93
  "\n",
94
- "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n"
95
  ]
96
  },
97
  {
98
  "data": {
99
  "text/html": [
100
- "<div><iframe src=\"https://93aea332a0c30fbbd1.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
101
  ],
102
  "text/plain": [
103
  "<IPython.core.display.HTML object>"
@@ -110,7 +108,7 @@
110
  "data": {
111
  "text/plain": []
112
  },
113
- "execution_count": 7,
114
  "metadata": {},
115
  "output_type": "execute_result"
116
  },
@@ -511,302 +509,6 @@
511
  "metadata": {},
512
  "output_type": "display_data"
513
  },
514
- {
515
- "data": {
516
- "text/html": [],
517
- "text/plain": [
518
- "<IPython.core.display.HTML object>"
519
- ]
520
- },
521
- "metadata": {},
522
- "output_type": "display_data"
523
- },
524
- {
525
- "data": {
526
- "text/html": [
527
- "\n",
528
- "<style>\n",
529
- " /* Turns off some styling */\n",
530
- " progress {\n",
531
- " /* gets rid of default border in Firefox and Opera. */\n",
532
- " border: none;\n",
533
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
534
- " background-size: auto;\n",
535
- " }\n",
536
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
537
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
538
- " }\n",
539
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
540
- " background: #F44336;\n",
541
- " }\n",
542
- "</style>\n"
543
- ],
544
- "text/plain": [
545
- "<IPython.core.display.HTML object>"
546
- ]
547
- },
548
- "metadata": {},
549
- "output_type": "display_data"
550
- },
551
- {
552
- "data": {
553
- "text/html": [],
554
- "text/plain": [
555
- "<IPython.core.display.HTML object>"
556
- ]
557
- },
558
- "metadata": {},
559
- "output_type": "display_data"
560
- },
561
- {
562
- "data": {
563
- "text/html": [
564
- "\n",
565
- "<style>\n",
566
- " /* Turns off some styling */\n",
567
- " progress {\n",
568
- " /* gets rid of default border in Firefox and Opera. */\n",
569
- " border: none;\n",
570
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
571
- " background-size: auto;\n",
572
- " }\n",
573
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
574
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
575
- " }\n",
576
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
577
- " background: #F44336;\n",
578
- " }\n",
579
- "</style>\n"
580
- ],
581
- "text/plain": [
582
- "<IPython.core.display.HTML object>"
583
- ]
584
- },
585
- "metadata": {},
586
- "output_type": "display_data"
587
- },
588
- {
589
- "data": {
590
- "text/html": [],
591
- "text/plain": [
592
- "<IPython.core.display.HTML object>"
593
- ]
594
- },
595
- "metadata": {},
596
- "output_type": "display_data"
597
- },
598
- {
599
- "data": {
600
- "text/html": [
601
- "\n",
602
- "<style>\n",
603
- " /* Turns off some styling */\n",
604
- " progress {\n",
605
- " /* gets rid of default border in Firefox and Opera. */\n",
606
- " border: none;\n",
607
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
608
- " background-size: auto;\n",
609
- " }\n",
610
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
611
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
612
- " }\n",
613
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
614
- " background: #F44336;\n",
615
- " }\n",
616
- "</style>\n"
617
- ],
618
- "text/plain": [
619
- "<IPython.core.display.HTML object>"
620
- ]
621
- },
622
- "metadata": {},
623
- "output_type": "display_data"
624
- },
625
- {
626
- "data": {
627
- "text/html": [],
628
- "text/plain": [
629
- "<IPython.core.display.HTML object>"
630
- ]
631
- },
632
- "metadata": {},
633
- "output_type": "display_data"
634
- },
635
- {
636
- "data": {
637
- "text/html": [
638
- "\n",
639
- "<style>\n",
640
- " /* Turns off some styling */\n",
641
- " progress {\n",
642
- " /* gets rid of default border in Firefox and Opera. */\n",
643
- " border: none;\n",
644
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
645
- " background-size: auto;\n",
646
- " }\n",
647
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
648
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
649
- " }\n",
650
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
651
- " background: #F44336;\n",
652
- " }\n",
653
- "</style>\n"
654
- ],
655
- "text/plain": [
656
- "<IPython.core.display.HTML object>"
657
- ]
658
- },
659
- "metadata": {},
660
- "output_type": "display_data"
661
- },
662
- {
663
- "data": {
664
- "text/html": [],
665
- "text/plain": [
666
- "<IPython.core.display.HTML object>"
667
- ]
668
- },
669
- "metadata": {},
670
- "output_type": "display_data"
671
- },
672
- {
673
- "data": {
674
- "text/html": [
675
- "\n",
676
- "<style>\n",
677
- " /* Turns off some styling */\n",
678
- " progress {\n",
679
- " /* gets rid of default border in Firefox and Opera. */\n",
680
- " border: none;\n",
681
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
682
- " background-size: auto;\n",
683
- " }\n",
684
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
685
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
686
- " }\n",
687
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
688
- " background: #F44336;\n",
689
- " }\n",
690
- "</style>\n"
691
- ],
692
- "text/plain": [
693
- "<IPython.core.display.HTML object>"
694
- ]
695
- },
696
- "metadata": {},
697
- "output_type": "display_data"
698
- },
699
- {
700
- "data": {
701
- "text/html": [],
702
- "text/plain": [
703
- "<IPython.core.display.HTML object>"
704
- ]
705
- },
706
- "metadata": {},
707
- "output_type": "display_data"
708
- },
709
- {
710
- "data": {
711
- "text/html": [
712
- "\n",
713
- "<style>\n",
714
- " /* Turns off some styling */\n",
715
- " progress {\n",
716
- " /* gets rid of default border in Firefox and Opera. */\n",
717
- " border: none;\n",
718
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
719
- " background-size: auto;\n",
720
- " }\n",
721
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
722
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
723
- " }\n",
724
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
725
- " background: #F44336;\n",
726
- " }\n",
727
- "</style>\n"
728
- ],
729
- "text/plain": [
730
- "<IPython.core.display.HTML object>"
731
- ]
732
- },
733
- "metadata": {},
734
- "output_type": "display_data"
735
- },
736
- {
737
- "data": {
738
- "text/html": [],
739
- "text/plain": [
740
- "<IPython.core.display.HTML object>"
741
- ]
742
- },
743
- "metadata": {},
744
- "output_type": "display_data"
745
- },
746
- {
747
- "data": {
748
- "text/html": [
749
- "\n",
750
- "<style>\n",
751
- " /* Turns off some styling */\n",
752
- " progress {\n",
753
- " /* gets rid of default border in Firefox and Opera. */\n",
754
- " border: none;\n",
755
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
756
- " background-size: auto;\n",
757
- " }\n",
758
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
759
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
760
- " }\n",
761
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
762
- " background: #F44336;\n",
763
- " }\n",
764
- "</style>\n"
765
- ],
766
- "text/plain": [
767
- "<IPython.core.display.HTML object>"
768
- ]
769
- },
770
- "metadata": {},
771
- "output_type": "display_data"
772
- },
773
- {
774
- "data": {
775
- "text/html": [],
776
- "text/plain": [
777
- "<IPython.core.display.HTML object>"
778
- ]
779
- },
780
- "metadata": {},
781
- "output_type": "display_data"
782
- },
783
- {
784
- "data": {
785
- "text/html": [
786
- "\n",
787
- "<style>\n",
788
- " /* Turns off some styling */\n",
789
- " progress {\n",
790
- " /* gets rid of default border in Firefox and Opera. */\n",
791
- " border: none;\n",
792
- " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
793
- " background-size: auto;\n",
794
- " }\n",
795
- " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
796
- " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
797
- " }\n",
798
- " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
799
- " background: #F44336;\n",
800
- " }\n",
801
- "</style>\n"
802
- ],
803
- "text/plain": [
804
- "<IPython.core.display.HTML object>"
805
- ]
806
- },
807
- "metadata": {},
808
- "output_type": "display_data"
809
- },
810
  {
811
  "data": {
812
  "text/html": [],
@@ -843,7 +545,7 @@
843
  },
844
  {
845
  "cell_type": "code",
846
- "execution_count": 1,
847
  "id": "edcc9a51",
848
  "metadata": {},
849
  "outputs": [],
 
20
  },
21
  {
22
  "cell_type": "code",
23
+ "execution_count": 2,
24
  "id": "3f54ef95",
25
  "metadata": {},
26
  "outputs": [],
 
33
  },
34
  {
35
  "cell_type": "code",
36
+ "execution_count": 3,
37
  "id": "d25179ca",
38
  "metadata": {},
39
  "outputs": [],
 
44
  },
45
  {
46
  "cell_type": "code",
47
+ "execution_count": 7,
48
  "id": "d752f05b",
49
  "metadata": {},
50
  "outputs": [],
51
  "source": [
52
  "#|export\n",
53
+ "categories = ['power line down after storm',\n",
54
+ " 'tree down on power line']\n",
 
55
  "\n",
56
  "def predict(img):\n",
57
  " img = PILImage.create(img)\n",
 
61
  },
62
  {
63
  "cell_type": "code",
64
+ "execution_count": 8,
65
  "id": "80d55893",
66
  "metadata": {
67
  "scrolled": false
 
87
  "name": "stdout",
88
  "output_type": "stream",
89
  "text": [
90
+ "Running on local URL: http://127.0.0.1:7861\n",
 
91
  "\n",
92
+ "Could not create share link. Please check your internet connection or our status page: https://status.gradio.app\n"
93
  ]
94
  },
95
  {
96
  "data": {
97
  "text/html": [
98
+ "<div><iframe src=\"http://127.0.0.1:7861/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
99
  ],
100
  "text/plain": [
101
  "<IPython.core.display.HTML object>"
 
108
  "data": {
109
  "text/plain": []
110
  },
111
+ "execution_count": 8,
112
  "metadata": {},
113
  "output_type": "execute_result"
114
  },
 
509
  "metadata": {},
510
  "output_type": "display_data"
511
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
  {
513
  "data": {
514
  "text/html": [],
 
545
  },
546
  {
547
  "cell_type": "code",
548
+ "execution_count": 6,
549
  "id": "edcc9a51",
550
  "metadata": {},
551
  "outputs": [],