jph00 commited on
Commit
a29946f
1 Parent(s): 1077091
Files changed (2) hide show
  1. app.ipynb +67 -34
  2. requirements.txt +1 -1
app.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "markdown",
5
- "id": "781ed627",
6
  "metadata": {},
7
  "source": [
8
  "## Gradio Pets"
@@ -10,7 +10,7 @@
10
  },
11
  {
12
  "cell_type": "code",
13
- "execution_count": null,
14
  "id": "44eb0ad3",
15
  "metadata": {},
16
  "outputs": [],
@@ -23,7 +23,7 @@
23
  },
24
  {
25
  "cell_type": "code",
26
- "execution_count": null,
27
  "id": "d838c0b3",
28
  "metadata": {},
29
  "outputs": [],
@@ -39,7 +39,7 @@
39
  },
40
  {
41
  "cell_type": "code",
42
- "execution_count": null,
43
  "id": "a362acc6",
44
  "metadata": {},
45
  "outputs": [
@@ -62,7 +62,7 @@
62
  },
63
  {
64
  "cell_type": "code",
65
- "execution_count": null,
66
  "id": "c107f724",
67
  "metadata": {},
68
  "outputs": [
@@ -191,7 +191,7 @@
191
  },
192
  {
193
  "cell_type": "code",
194
- "execution_count": null,
195
  "id": "f5513582",
196
  "metadata": {},
197
  "outputs": [
@@ -207,7 +207,7 @@
207
  " 'beit_large_patch16_512']"
208
  ]
209
  },
210
- "execution_count": null,
211
  "metadata": {},
212
  "output_type": "execute_result"
213
  }
@@ -218,9 +218,11 @@
218
  },
219
  {
220
  "cell_type": "code",
221
- "execution_count": null,
222
  "id": "8553db7c",
223
- "metadata": {},
 
 
224
  "outputs": [
225
  {
226
  "name": "stderr",
@@ -355,7 +357,7 @@
355
  },
356
  {
357
  "cell_type": "code",
358
- "execution_count": null,
359
  "id": "3ecf6ebf",
360
  "metadata": {},
361
  "outputs": [],
@@ -370,7 +372,7 @@
370
  },
371
  {
372
  "cell_type": "code",
373
- "execution_count": null,
374
  "id": "8d7226bc",
375
  "metadata": {},
376
  "outputs": [
@@ -393,9 +395,11 @@
393
  },
394
  {
395
  "cell_type": "code",
396
- "execution_count": null,
397
- "id": "e877ade5",
398
- "metadata": {},
 
 
399
  "outputs": [
400
  {
401
  "data": {
@@ -522,7 +526,7 @@
522
  },
523
  {
524
  "cell_type": "code",
525
- "execution_count": null,
526
  "id": "5171c7fc",
527
  "metadata": {},
528
  "outputs": [],
@@ -532,7 +536,7 @@
532
  },
533
  {
534
  "cell_type": "code",
535
- "execution_count": null,
536
  "id": "3295ef11",
537
  "metadata": {},
538
  "outputs": [
@@ -543,7 +547,7 @@
543
  "PILImage mode=RGB size=224x149"
544
  ]
545
  },
546
- "execution_count": null,
547
  "metadata": {},
548
  "output_type": "execute_result"
549
  }
@@ -556,7 +560,7 @@
556
  },
557
  {
558
  "cell_type": "code",
559
- "execution_count": null,
560
  "id": "ae2bc6ac",
561
  "metadata": {},
562
  "outputs": [],
@@ -567,9 +571,11 @@
567
  },
568
  {
569
  "cell_type": "code",
570
- "execution_count": null,
571
  "id": "6e0bf9da",
572
- "metadata": {},
 
 
573
  "outputs": [
574
  {
575
  "data": {
@@ -619,7 +625,7 @@
619
  " 9.5551e-06]))"
620
  ]
621
  },
622
- "execution_count": null,
623
  "metadata": {},
624
  "output_type": "execute_result"
625
  }
@@ -630,7 +636,7 @@
630
  },
631
  {
632
  "cell_type": "code",
633
- "execution_count": null,
634
  "id": "0419ed3a",
635
  "metadata": {},
636
  "outputs": [],
@@ -645,7 +651,7 @@
645
  },
646
  {
647
  "cell_type": "code",
648
- "execution_count": null,
649
  "id": "762dec00",
650
  "metadata": {},
651
  "outputs": [
@@ -725,7 +731,7 @@
725
  " 'yorkshire_terrier': 9.555054930387996e-06}"
726
  ]
727
  },
728
- "execution_count": null,
729
  "metadata": {},
730
  "output_type": "execute_result"
731
  }
@@ -736,8 +742,8 @@
736
  },
737
  {
738
  "cell_type": "code",
739
- "execution_count": null,
740
- "id": "786628d0",
741
  "metadata": {},
742
  "outputs": [],
743
  "source": [
@@ -750,18 +756,18 @@
750
  {
751
  "cell_type": "code",
752
  "execution_count": null,
753
- "id": "0c6ad1ad",
754
  "metadata": {},
755
  "outputs": [],
756
  "source": [
757
  "#export\n",
758
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)\n",
759
- "intf.launch()"
760
  ]
761
  },
762
  {
763
  "cell_type": "code",
764
- "execution_count": null,
765
  "id": "10332812",
766
  "metadata": {},
767
  "outputs": [
@@ -779,7 +785,7 @@
779
  },
780
  {
781
  "cell_type": "code",
782
- "execution_count": null,
783
  "id": "103be39f",
784
  "metadata": {},
785
  "outputs": [],
@@ -791,7 +797,7 @@
791
  },
792
  {
793
  "cell_type": "code",
794
- "execution_count": null,
795
  "id": "fd962acc",
796
  "metadata": {},
797
  "outputs": [],
@@ -807,9 +813,11 @@
807
  },
808
  {
809
  "cell_type": "code",
810
- "execution_count": null,
811
  "id": "a55f921b",
812
- "metadata": {},
 
 
813
  "outputs": [
814
  {
815
  "data": {
@@ -823,7 +831,7 @@
823
  " 'avg_durations': [1.2002585530281067]}"
824
  ]
825
  },
826
- "execution_count": null,
827
  "metadata": {},
828
  "output_type": "execute_result"
829
  }
@@ -848,6 +856,31 @@
848
  "display_name": "Python 3 (ipykernel)",
849
  "language": "python",
850
  "name": "python3"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
851
  }
852
  },
853
  "nbformat": 4,
 
2
  "cells": [
3
  {
4
  "cell_type": "markdown",
5
+ "id": "7195af18",
6
  "metadata": {},
7
  "source": [
8
  "## Gradio Pets"
 
10
  },
11
  {
12
  "cell_type": "code",
13
+ "execution_count": 1,
14
  "id": "44eb0ad3",
15
  "metadata": {},
16
  "outputs": [],
 
23
  },
24
  {
25
  "cell_type": "code",
26
+ "execution_count": 5,
27
  "id": "d838c0b3",
28
  "metadata": {},
29
  "outputs": [],
 
39
  },
40
  {
41
  "cell_type": "code",
42
+ "execution_count": 3,
43
  "id": "a362acc6",
44
  "metadata": {},
45
  "outputs": [
 
62
  },
63
  {
64
  "cell_type": "code",
65
+ "execution_count": 4,
66
  "id": "c107f724",
67
  "metadata": {},
68
  "outputs": [
 
191
  },
192
  {
193
  "cell_type": "code",
194
+ "execution_count": 10,
195
  "id": "f5513582",
196
  "metadata": {},
197
  "outputs": [
 
207
  " 'beit_large_patch16_512']"
208
  ]
209
  },
210
+ "execution_count": 10,
211
  "metadata": {},
212
  "output_type": "execute_result"
213
  }
 
218
  },
219
  {
220
  "cell_type": "code",
221
+ "execution_count": 6,
222
  "id": "8553db7c",
223
+ "metadata": {
224
+ "scrolled": false
225
+ },
226
  "outputs": [
227
  {
228
  "name": "stderr",
 
357
  },
358
  {
359
  "cell_type": "code",
360
+ "execution_count": 8,
361
  "id": "3ecf6ebf",
362
  "metadata": {},
363
  "outputs": [],
 
372
  },
373
  {
374
  "cell_type": "code",
375
+ "execution_count": 8,
376
  "id": "8d7226bc",
377
  "metadata": {},
378
  "outputs": [
 
395
  },
396
  {
397
  "cell_type": "code",
398
+ "execution_count": 9,
399
+ "id": "d39c7b93",
400
+ "metadata": {
401
+ "scrolled": false
402
+ },
403
  "outputs": [
404
  {
405
  "data": {
 
526
  },
527
  {
528
  "cell_type": "code",
529
+ "execution_count": 7,
530
  "id": "5171c7fc",
531
  "metadata": {},
532
  "outputs": [],
 
536
  },
537
  {
538
  "cell_type": "code",
539
+ "execution_count": 2,
540
  "id": "3295ef11",
541
  "metadata": {},
542
  "outputs": [
 
547
  "PILImage mode=RGB size=224x149"
548
  ]
549
  },
550
+ "execution_count": 2,
551
  "metadata": {},
552
  "output_type": "execute_result"
553
  }
 
560
  },
561
  {
562
  "cell_type": "code",
563
+ "execution_count": 3,
564
  "id": "ae2bc6ac",
565
  "metadata": {},
566
  "outputs": [],
 
571
  },
572
  {
573
  "cell_type": "code",
574
+ "execution_count": 4,
575
  "id": "6e0bf9da",
576
+ "metadata": {
577
+ "scrolled": false
578
+ },
579
  "outputs": [
580
  {
581
  "data": {
 
625
  " 9.5551e-06]))"
626
  ]
627
  },
628
+ "execution_count": 4,
629
  "metadata": {},
630
  "output_type": "execute_result"
631
  }
 
636
  },
637
  {
638
  "cell_type": "code",
639
+ "execution_count": 5,
640
  "id": "0419ed3a",
641
  "metadata": {},
642
  "outputs": [],
 
651
  },
652
  {
653
  "cell_type": "code",
654
+ "execution_count": 6,
655
  "id": "762dec00",
656
  "metadata": {},
657
  "outputs": [
 
731
  " 'yorkshire_terrier': 9.555054930387996e-06}"
732
  ]
733
  },
734
+ "execution_count": 6,
735
  "metadata": {},
736
  "output_type": "execute_result"
737
  }
 
742
  },
743
  {
744
  "cell_type": "code",
745
+ "execution_count": 7,
746
+ "id": "930cf172",
747
  "metadata": {},
748
  "outputs": [],
749
  "source": [
 
756
  {
757
  "cell_type": "code",
758
  "execution_count": null,
759
+ "id": "4f463e23",
760
  "metadata": {},
761
  "outputs": [],
762
  "source": [
763
  "#export\n",
764
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)\n",
765
+ "intf.launch(server_port=3000, inline=False)"
766
  ]
767
  },
768
  {
769
  "cell_type": "code",
770
+ "execution_count": 15,
771
  "id": "10332812",
772
  "metadata": {},
773
  "outputs": [
 
785
  },
786
  {
787
  "cell_type": "code",
788
+ "execution_count": 8,
789
  "id": "103be39f",
790
  "metadata": {},
791
  "outputs": [],
 
797
  },
798
  {
799
  "cell_type": "code",
800
+ "execution_count": 80,
801
  "id": "fd962acc",
802
  "metadata": {},
803
  "outputs": [],
 
813
  },
814
  {
815
  "cell_type": "code",
816
+ "execution_count": 91,
817
  "id": "a55f921b",
818
+ "metadata": {
819
+ "scrolled": true
820
+ },
821
  "outputs": [
822
  {
823
  "data": {
 
831
  " 'avg_durations': [1.2002585530281067]}"
832
  ]
833
  },
834
+ "execution_count": 91,
835
  "metadata": {},
836
  "output_type": "execute_result"
837
  }
 
856
  "display_name": "Python 3 (ipykernel)",
857
  "language": "python",
858
  "name": "python3"
859
+ },
860
+ "language_info": {
861
+ "codemirror_mode": {
862
+ "name": "ipython",
863
+ "version": 3
864
+ },
865
+ "file_extension": ".py",
866
+ "mimetype": "text/x-python",
867
+ "name": "python",
868
+ "nbconvert_exporter": "python",
869
+ "pygments_lexer": "ipython3",
870
+ "version": "3.9.5"
871
+ },
872
+ "toc": {
873
+ "base_numbering": 1,
874
+ "nav_menu": {},
875
+ "number_sections": false,
876
+ "sideBar": true,
877
+ "skip_h1_title": false,
878
+ "title_cell": "Table of Contents",
879
+ "title_sidebar": "Contents",
880
+ "toc_cell": false,
881
+ "toc_position": {},
882
+ "toc_section_display": true,
883
+ "toc_window_display": false
884
  }
885
  },
886
  "nbformat": 4,
requirements.txt CHANGED
@@ -1,3 +1,3 @@
1
- fastai>2.6.0
2
  timm
3
 
 
1
+ fastai>2.6.1
2
  timm
3