merve HF Staff commited on
Commit
5447199
·
verified ·
1 Parent(s): fab7740

Upload Image_Search_with_MetaCLIP2.ipynb

Browse files
Files changed (1) hide show
  1. Image_Search_with_MetaCLIP2.ipynb +3 -1130
Image_Search_with_MetaCLIP2.ipynb CHANGED
@@ -119,108 +119,11 @@
119
  },
120
  {
121
  "cell_type": "code",
122
- "execution_count": 3,
123
  "metadata": {
124
- "colab": {
125
- "base_uri": "https://localhost:8080/",
126
- "height": 168,
127
- "referenced_widgets": [
128
- "d4448bd780ae4546ac3545ae9032651b",
129
- "3f3a425e3e8c49eba7a3a39de6a37e9a",
130
- "2d7afcd848e8424cb3897fd86536afa9",
131
- "8580bdeca78245839afe181cb31aa119",
132
- "3b40e4d6f5234288b77a028bbb29c40a",
133
- "78313ee27fb14fe7ae70da3f0ac7e5c8",
134
- "b160c789ebcc4760b3af3efc01c23f37",
135
- "c8c1b8cf2c3c4f198dbab66255cf8fa4",
136
- "fd90ac777900440d8ce1e49c735e0061",
137
- "54bcadb6bbdf41a9ba7470b6438cf5f6",
138
- "b2d62a2cae4e4b44a1c69c5bbf95c93d",
139
- "406cec591db24bf1bd3d8d5035c736f7",
140
- "d938a7e9ce4940678655993750b1c6f0",
141
- "fe817ef1a7204b368c6d480c975a0879",
142
- "5bfb98860175448c9556f978154b4054",
143
- "a002976a9081468e84ce4947340cd1a1",
144
- "98c80e0f1857458791363b9e625419f6",
145
- "21adf508433e4c9880669eacd815e3bf",
146
- "6049860ce9d443d6ad2375ac6002681d",
147
- "d10d4cb8f2aa454f914c1d92eb3d5560",
148
- "7c23282868a64ccebf0abe3e10ee26a7",
149
- "7d9f2e91ae8a4417893368e05ecd81bc",
150
- "34707c8206e545b7b2d12729790833b1",
151
- "55e0c5c479e24c09b0e48eb3fa688fc7",
152
- "50c15e4c06bc45c38759b7693989661c",
153
- "2859e4ef1c99467aa24d53e1c2fa5884",
154
- "b96b0da8986744efaf541834e1e53e19",
155
- "c53ed16146a24d989b4ee4cf03d3932a",
156
- "e28de7f377fc457295fef27c082d9334",
157
- "ada39e0694e34f95bdfdab576b153961",
158
- "384ebf941af5426c99ad27d06cf8d8a2",
159
- "910c22b8050649f28fde39098cb04f40",
160
- "b1cf637960344d6198a146cc661f736f"
161
- ]
162
- },
163
- "id": "T1dAaJ6ON1Bu",
164
- "outputId": "24c68bd3-fcfa-4aa5-e636-12d810157d5c"
165
  },
166
- "outputs": [
167
- {
168
- "output_type": "stream",
169
- "name": "stderr",
170
- "text": [
171
- "`torch_dtype` is deprecated! Use `dtype` instead!\n"
172
- ]
173
- },
174
- {
175
- "output_type": "display_data",
176
- "data": {
177
- "text/plain": [
178
- "Loading checkpoint shards: 0%| | 0/3 [00:00<?, ?it/s]"
179
- ],
180
- "application/vnd.jupyter.widget-view+json": {
181
- "version_major": 2,
182
- "version_minor": 0,
183
- "model_id": "d4448bd780ae4546ac3545ae9032651b"
184
- }
185
- },
186
- "metadata": {}
187
- },
188
- {
189
- "output_type": "display_data",
190
- "data": {
191
- "text/plain": [
192
- "Fetching 1 files: 0%| | 0/1 [00:00<?, ?it/s]"
193
- ],
194
- "application/vnd.jupyter.widget-view+json": {
195
- "version_major": 2,
196
- "version_minor": 0,
197
- "model_id": "406cec591db24bf1bd3d8d5035c736f7"
198
- }
199
- },
200
- "metadata": {}
201
- },
202
- {
203
- "output_type": "stream",
204
- "name": "stderr",
205
- "text": [
206
- "Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`.\n"
207
- ]
208
- },
209
- {
210
- "output_type": "display_data",
211
- "data": {
212
- "text/plain": [
213
- "Fetching 1 files: 0%| | 0/1 [00:00<?, ?it/s]"
214
- ],
215
- "application/vnd.jupyter.widget-view+json": {
216
- "version_major": 2,
217
- "version_minor": 0,
218
- "model_id": "34707c8206e545b7b2d12729790833b1"
219
- }
220
- },
221
- "metadata": {}
222
- }
223
- ],
224
  "source": [
225
  "import torch\n",
226
  "from transformers import AutoProcessor, AutoModel, infer_device\n",
@@ -509,1036 +412,6 @@
509
  "language_info": {
510
  "name": "python"
511
  },
512
- "widgets": {
513
- "application/vnd.jupyter.widget-state+json": {
514
- "d4448bd780ae4546ac3545ae9032651b": {
515
- "model_module": "@jupyter-widgets/controls",
516
- "model_name": "HBoxModel",
517
- "model_module_version": "1.5.0",
518
- "state": {
519
- "_dom_classes": [],
520
- "_model_module": "@jupyter-widgets/controls",
521
- "_model_module_version": "1.5.0",
522
- "_model_name": "HBoxModel",
523
- "_view_count": null,
524
- "_view_module": "@jupyter-widgets/controls",
525
- "_view_module_version": "1.5.0",
526
- "_view_name": "HBoxView",
527
- "box_style": "",
528
- "children": [
529
- "IPY_MODEL_3f3a425e3e8c49eba7a3a39de6a37e9a",
530
- "IPY_MODEL_2d7afcd848e8424cb3897fd86536afa9",
531
- "IPY_MODEL_8580bdeca78245839afe181cb31aa119"
532
- ],
533
- "layout": "IPY_MODEL_3b40e4d6f5234288b77a028bbb29c40a"
534
- }
535
- },
536
- "3f3a425e3e8c49eba7a3a39de6a37e9a": {
537
- "model_module": "@jupyter-widgets/controls",
538
- "model_name": "HTMLModel",
539
- "model_module_version": "1.5.0",
540
- "state": {
541
- "_dom_classes": [],
542
- "_model_module": "@jupyter-widgets/controls",
543
- "_model_module_version": "1.5.0",
544
- "_model_name": "HTMLModel",
545
- "_view_count": null,
546
- "_view_module": "@jupyter-widgets/controls",
547
- "_view_module_version": "1.5.0",
548
- "_view_name": "HTMLView",
549
- "description": "",
550
- "description_tooltip": null,
551
- "layout": "IPY_MODEL_78313ee27fb14fe7ae70da3f0ac7e5c8",
552
- "placeholder": "​",
553
- "style": "IPY_MODEL_b160c789ebcc4760b3af3efc01c23f37",
554
- "value": "Loading checkpoint shards: 100%"
555
- }
556
- },
557
- "2d7afcd848e8424cb3897fd86536afa9": {
558
- "model_module": "@jupyter-widgets/controls",
559
- "model_name": "FloatProgressModel",
560
- "model_module_version": "1.5.0",
561
- "state": {
562
- "_dom_classes": [],
563
- "_model_module": "@jupyter-widgets/controls",
564
- "_model_module_version": "1.5.0",
565
- "_model_name": "FloatProgressModel",
566
- "_view_count": null,
567
- "_view_module": "@jupyter-widgets/controls",
568
- "_view_module_version": "1.5.0",
569
- "_view_name": "ProgressView",
570
- "bar_style": "success",
571
- "description": "",
572
- "description_tooltip": null,
573
- "layout": "IPY_MODEL_c8c1b8cf2c3c4f198dbab66255cf8fa4",
574
- "max": 3,
575
- "min": 0,
576
- "orientation": "horizontal",
577
- "style": "IPY_MODEL_fd90ac777900440d8ce1e49c735e0061",
578
- "value": 3
579
- }
580
- },
581
- "8580bdeca78245839afe181cb31aa119": {
582
- "model_module": "@jupyter-widgets/controls",
583
- "model_name": "HTMLModel",
584
- "model_module_version": "1.5.0",
585
- "state": {
586
- "_dom_classes": [],
587
- "_model_module": "@jupyter-widgets/controls",
588
- "_model_module_version": "1.5.0",
589
- "_model_name": "HTMLModel",
590
- "_view_count": null,
591
- "_view_module": "@jupyter-widgets/controls",
592
- "_view_module_version": "1.5.0",
593
- "_view_name": "HTMLView",
594
- "description": "",
595
- "description_tooltip": null,
596
- "layout": "IPY_MODEL_54bcadb6bbdf41a9ba7470b6438cf5f6",
597
- "placeholder": "​",
598
- "style": "IPY_MODEL_b2d62a2cae4e4b44a1c69c5bbf95c93d",
599
- "value": " 3/3 [00:01&lt;00:00,  1.46it/s]"
600
- }
601
- },
602
- "3b40e4d6f5234288b77a028bbb29c40a": {
603
- "model_module": "@jupyter-widgets/base",
604
- "model_name": "LayoutModel",
605
- "model_module_version": "1.2.0",
606
- "state": {
607
- "_model_module": "@jupyter-widgets/base",
608
- "_model_module_version": "1.2.0",
609
- "_model_name": "LayoutModel",
610
- "_view_count": null,
611
- "_view_module": "@jupyter-widgets/base",
612
- "_view_module_version": "1.2.0",
613
- "_view_name": "LayoutView",
614
- "align_content": null,
615
- "align_items": null,
616
- "align_self": null,
617
- "border": null,
618
- "bottom": null,
619
- "display": null,
620
- "flex": null,
621
- "flex_flow": null,
622
- "grid_area": null,
623
- "grid_auto_columns": null,
624
- "grid_auto_flow": null,
625
- "grid_auto_rows": null,
626
- "grid_column": null,
627
- "grid_gap": null,
628
- "grid_row": null,
629
- "grid_template_areas": null,
630
- "grid_template_columns": null,
631
- "grid_template_rows": null,
632
- "height": null,
633
- "justify_content": null,
634
- "justify_items": null,
635
- "left": null,
636
- "margin": null,
637
- "max_height": null,
638
- "max_width": null,
639
- "min_height": null,
640
- "min_width": null,
641
- "object_fit": null,
642
- "object_position": null,
643
- "order": null,
644
- "overflow": null,
645
- "overflow_x": null,
646
- "overflow_y": null,
647
- "padding": null,
648
- "right": null,
649
- "top": null,
650
- "visibility": null,
651
- "width": null
652
- }
653
- },
654
- "78313ee27fb14fe7ae70da3f0ac7e5c8": {
655
- "model_module": "@jupyter-widgets/base",
656
- "model_name": "LayoutModel",
657
- "model_module_version": "1.2.0",
658
- "state": {
659
- "_model_module": "@jupyter-widgets/base",
660
- "_model_module_version": "1.2.0",
661
- "_model_name": "LayoutModel",
662
- "_view_count": null,
663
- "_view_module": "@jupyter-widgets/base",
664
- "_view_module_version": "1.2.0",
665
- "_view_name": "LayoutView",
666
- "align_content": null,
667
- "align_items": null,
668
- "align_self": null,
669
- "border": null,
670
- "bottom": null,
671
- "display": null,
672
- "flex": null,
673
- "flex_flow": null,
674
- "grid_area": null,
675
- "grid_auto_columns": null,
676
- "grid_auto_flow": null,
677
- "grid_auto_rows": null,
678
- "grid_column": null,
679
- "grid_gap": null,
680
- "grid_row": null,
681
- "grid_template_areas": null,
682
- "grid_template_columns": null,
683
- "grid_template_rows": null,
684
- "height": null,
685
- "justify_content": null,
686
- "justify_items": null,
687
- "left": null,
688
- "margin": null,
689
- "max_height": null,
690
- "max_width": null,
691
- "min_height": null,
692
- "min_width": null,
693
- "object_fit": null,
694
- "object_position": null,
695
- "order": null,
696
- "overflow": null,
697
- "overflow_x": null,
698
- "overflow_y": null,
699
- "padding": null,
700
- "right": null,
701
- "top": null,
702
- "visibility": null,
703
- "width": null
704
- }
705
- },
706
- "b160c789ebcc4760b3af3efc01c23f37": {
707
- "model_module": "@jupyter-widgets/controls",
708
- "model_name": "DescriptionStyleModel",
709
- "model_module_version": "1.5.0",
710
- "state": {
711
- "_model_module": "@jupyter-widgets/controls",
712
- "_model_module_version": "1.5.0",
713
- "_model_name": "DescriptionStyleModel",
714
- "_view_count": null,
715
- "_view_module": "@jupyter-widgets/base",
716
- "_view_module_version": "1.2.0",
717
- "_view_name": "StyleView",
718
- "description_width": ""
719
- }
720
- },
721
- "c8c1b8cf2c3c4f198dbab66255cf8fa4": {
722
- "model_module": "@jupyter-widgets/base",
723
- "model_name": "LayoutModel",
724
- "model_module_version": "1.2.0",
725
- "state": {
726
- "_model_module": "@jupyter-widgets/base",
727
- "_model_module_version": "1.2.0",
728
- "_model_name": "LayoutModel",
729
- "_view_count": null,
730
- "_view_module": "@jupyter-widgets/base",
731
- "_view_module_version": "1.2.0",
732
- "_view_name": "LayoutView",
733
- "align_content": null,
734
- "align_items": null,
735
- "align_self": null,
736
- "border": null,
737
- "bottom": null,
738
- "display": null,
739
- "flex": null,
740
- "flex_flow": null,
741
- "grid_area": null,
742
- "grid_auto_columns": null,
743
- "grid_auto_flow": null,
744
- "grid_auto_rows": null,
745
- "grid_column": null,
746
- "grid_gap": null,
747
- "grid_row": null,
748
- "grid_template_areas": null,
749
- "grid_template_columns": null,
750
- "grid_template_rows": null,
751
- "height": null,
752
- "justify_content": null,
753
- "justify_items": null,
754
- "left": null,
755
- "margin": null,
756
- "max_height": null,
757
- "max_width": null,
758
- "min_height": null,
759
- "min_width": null,
760
- "object_fit": null,
761
- "object_position": null,
762
- "order": null,
763
- "overflow": null,
764
- "overflow_x": null,
765
- "overflow_y": null,
766
- "padding": null,
767
- "right": null,
768
- "top": null,
769
- "visibility": null,
770
- "width": null
771
- }
772
- },
773
- "fd90ac777900440d8ce1e49c735e0061": {
774
- "model_module": "@jupyter-widgets/controls",
775
- "model_name": "ProgressStyleModel",
776
- "model_module_version": "1.5.0",
777
- "state": {
778
- "_model_module": "@jupyter-widgets/controls",
779
- "_model_module_version": "1.5.0",
780
- "_model_name": "ProgressStyleModel",
781
- "_view_count": null,
782
- "_view_module": "@jupyter-widgets/base",
783
- "_view_module_version": "1.2.0",
784
- "_view_name": "StyleView",
785
- "bar_color": null,
786
- "description_width": ""
787
- }
788
- },
789
- "54bcadb6bbdf41a9ba7470b6438cf5f6": {
790
- "model_module": "@jupyter-widgets/base",
791
- "model_name": "LayoutModel",
792
- "model_module_version": "1.2.0",
793
- "state": {
794
- "_model_module": "@jupyter-widgets/base",
795
- "_model_module_version": "1.2.0",
796
- "_model_name": "LayoutModel",
797
- "_view_count": null,
798
- "_view_module": "@jupyter-widgets/base",
799
- "_view_module_version": "1.2.0",
800
- "_view_name": "LayoutView",
801
- "align_content": null,
802
- "align_items": null,
803
- "align_self": null,
804
- "border": null,
805
- "bottom": null,
806
- "display": null,
807
- "flex": null,
808
- "flex_flow": null,
809
- "grid_area": null,
810
- "grid_auto_columns": null,
811
- "grid_auto_flow": null,
812
- "grid_auto_rows": null,
813
- "grid_column": null,
814
- "grid_gap": null,
815
- "grid_row": null,
816
- "grid_template_areas": null,
817
- "grid_template_columns": null,
818
- "grid_template_rows": null,
819
- "height": null,
820
- "justify_content": null,
821
- "justify_items": null,
822
- "left": null,
823
- "margin": null,
824
- "max_height": null,
825
- "max_width": null,
826
- "min_height": null,
827
- "min_width": null,
828
- "object_fit": null,
829
- "object_position": null,
830
- "order": null,
831
- "overflow": null,
832
- "overflow_x": null,
833
- "overflow_y": null,
834
- "padding": null,
835
- "right": null,
836
- "top": null,
837
- "visibility": null,
838
- "width": null
839
- }
840
- },
841
- "b2d62a2cae4e4b44a1c69c5bbf95c93d": {
842
- "model_module": "@jupyter-widgets/controls",
843
- "model_name": "DescriptionStyleModel",
844
- "model_module_version": "1.5.0",
845
- "state": {
846
- "_model_module": "@jupyter-widgets/controls",
847
- "_model_module_version": "1.5.0",
848
- "_model_name": "DescriptionStyleModel",
849
- "_view_count": null,
850
- "_view_module": "@jupyter-widgets/base",
851
- "_view_module_version": "1.2.0",
852
- "_view_name": "StyleView",
853
- "description_width": ""
854
- }
855
- },
856
- "406cec591db24bf1bd3d8d5035c736f7": {
857
- "model_module": "@jupyter-widgets/controls",
858
- "model_name": "HBoxModel",
859
- "model_module_version": "1.5.0",
860
- "state": {
861
- "_dom_classes": [],
862
- "_model_module": "@jupyter-widgets/controls",
863
- "_model_module_version": "1.5.0",
864
- "_model_name": "HBoxModel",
865
- "_view_count": null,
866
- "_view_module": "@jupyter-widgets/controls",
867
- "_view_module_version": "1.5.0",
868
- "_view_name": "HBoxView",
869
- "box_style": "",
870
- "children": [
871
- "IPY_MODEL_d938a7e9ce4940678655993750b1c6f0",
872
- "IPY_MODEL_fe817ef1a7204b368c6d480c975a0879",
873
- "IPY_MODEL_5bfb98860175448c9556f978154b4054"
874
- ],
875
- "layout": "IPY_MODEL_a002976a9081468e84ce4947340cd1a1"
876
- }
877
- },
878
- "d938a7e9ce4940678655993750b1c6f0": {
879
- "model_module": "@jupyter-widgets/controls",
880
- "model_name": "HTMLModel",
881
- "model_module_version": "1.5.0",
882
- "state": {
883
- "_dom_classes": [],
884
- "_model_module": "@jupyter-widgets/controls",
885
- "_model_module_version": "1.5.0",
886
- "_model_name": "HTMLModel",
887
- "_view_count": null,
888
- "_view_module": "@jupyter-widgets/controls",
889
- "_view_module_version": "1.5.0",
890
- "_view_name": "HTMLView",
891
- "description": "",
892
- "description_tooltip": null,
893
- "layout": "IPY_MODEL_98c80e0f1857458791363b9e625419f6",
894
- "placeholder": "​",
895
- "style": "IPY_MODEL_21adf508433e4c9880669eacd815e3bf",
896
- "value": "Fetching 1 files: 100%"
897
- }
898
- },
899
- "fe817ef1a7204b368c6d480c975a0879": {
900
- "model_module": "@jupyter-widgets/controls",
901
- "model_name": "FloatProgressModel",
902
- "model_module_version": "1.5.0",
903
- "state": {
904
- "_dom_classes": [],
905
- "_model_module": "@jupyter-widgets/controls",
906
- "_model_module_version": "1.5.0",
907
- "_model_name": "FloatProgressModel",
908
- "_view_count": null,
909
- "_view_module": "@jupyter-widgets/controls",
910
- "_view_module_version": "1.5.0",
911
- "_view_name": "ProgressView",
912
- "bar_style": "success",
913
- "description": "",
914
- "description_tooltip": null,
915
- "layout": "IPY_MODEL_6049860ce9d443d6ad2375ac6002681d",
916
- "max": 1,
917
- "min": 0,
918
- "orientation": "horizontal",
919
- "style": "IPY_MODEL_d10d4cb8f2aa454f914c1d92eb3d5560",
920
- "value": 1
921
- }
922
- },
923
- "5bfb98860175448c9556f978154b4054": {
924
- "model_module": "@jupyter-widgets/controls",
925
- "model_name": "HTMLModel",
926
- "model_module_version": "1.5.0",
927
- "state": {
928
- "_dom_classes": [],
929
- "_model_module": "@jupyter-widgets/controls",
930
- "_model_module_version": "1.5.0",
931
- "_model_name": "HTMLModel",
932
- "_view_count": null,
933
- "_view_module": "@jupyter-widgets/controls",
934
- "_view_module_version": "1.5.0",
935
- "_view_name": "HTMLView",
936
- "description": "",
937
- "description_tooltip": null,
938
- "layout": "IPY_MODEL_7c23282868a64ccebf0abe3e10ee26a7",
939
- "placeholder": "​",
940
- "style": "IPY_MODEL_7d9f2e91ae8a4417893368e05ecd81bc",
941
- "value": " 1/1 [00:00&lt;00:00, 93.45it/s]"
942
- }
943
- },
944
- "a002976a9081468e84ce4947340cd1a1": {
945
- "model_module": "@jupyter-widgets/base",
946
- "model_name": "LayoutModel",
947
- "model_module_version": "1.2.0",
948
- "state": {
949
- "_model_module": "@jupyter-widgets/base",
950
- "_model_module_version": "1.2.0",
951
- "_model_name": "LayoutModel",
952
- "_view_count": null,
953
- "_view_module": "@jupyter-widgets/base",
954
- "_view_module_version": "1.2.0",
955
- "_view_name": "LayoutView",
956
- "align_content": null,
957
- "align_items": null,
958
- "align_self": null,
959
- "border": null,
960
- "bottom": null,
961
- "display": null,
962
- "flex": null,
963
- "flex_flow": null,
964
- "grid_area": null,
965
- "grid_auto_columns": null,
966
- "grid_auto_flow": null,
967
- "grid_auto_rows": null,
968
- "grid_column": null,
969
- "grid_gap": null,
970
- "grid_row": null,
971
- "grid_template_areas": null,
972
- "grid_template_columns": null,
973
- "grid_template_rows": null,
974
- "height": null,
975
- "justify_content": null,
976
- "justify_items": null,
977
- "left": null,
978
- "margin": null,
979
- "max_height": null,
980
- "max_width": null,
981
- "min_height": null,
982
- "min_width": null,
983
- "object_fit": null,
984
- "object_position": null,
985
- "order": null,
986
- "overflow": null,
987
- "overflow_x": null,
988
- "overflow_y": null,
989
- "padding": null,
990
- "right": null,
991
- "top": null,
992
- "visibility": null,
993
- "width": null
994
- }
995
- },
996
- "98c80e0f1857458791363b9e625419f6": {
997
- "model_module": "@jupyter-widgets/base",
998
- "model_name": "LayoutModel",
999
- "model_module_version": "1.2.0",
1000
- "state": {
1001
- "_model_module": "@jupyter-widgets/base",
1002
- "_model_module_version": "1.2.0",
1003
- "_model_name": "LayoutModel",
1004
- "_view_count": null,
1005
- "_view_module": "@jupyter-widgets/base",
1006
- "_view_module_version": "1.2.0",
1007
- "_view_name": "LayoutView",
1008
- "align_content": null,
1009
- "align_items": null,
1010
- "align_self": null,
1011
- "border": null,
1012
- "bottom": null,
1013
- "display": null,
1014
- "flex": null,
1015
- "flex_flow": null,
1016
- "grid_area": null,
1017
- "grid_auto_columns": null,
1018
- "grid_auto_flow": null,
1019
- "grid_auto_rows": null,
1020
- "grid_column": null,
1021
- "grid_gap": null,
1022
- "grid_row": null,
1023
- "grid_template_areas": null,
1024
- "grid_template_columns": null,
1025
- "grid_template_rows": null,
1026
- "height": null,
1027
- "justify_content": null,
1028
- "justify_items": null,
1029
- "left": null,
1030
- "margin": null,
1031
- "max_height": null,
1032
- "max_width": null,
1033
- "min_height": null,
1034
- "min_width": null,
1035
- "object_fit": null,
1036
- "object_position": null,
1037
- "order": null,
1038
- "overflow": null,
1039
- "overflow_x": null,
1040
- "overflow_y": null,
1041
- "padding": null,
1042
- "right": null,
1043
- "top": null,
1044
- "visibility": null,
1045
- "width": null
1046
- }
1047
- },
1048
- "21adf508433e4c9880669eacd815e3bf": {
1049
- "model_module": "@jupyter-widgets/controls",
1050
- "model_name": "DescriptionStyleModel",
1051
- "model_module_version": "1.5.0",
1052
- "state": {
1053
- "_model_module": "@jupyter-widgets/controls",
1054
- "_model_module_version": "1.5.0",
1055
- "_model_name": "DescriptionStyleModel",
1056
- "_view_count": null,
1057
- "_view_module": "@jupyter-widgets/base",
1058
- "_view_module_version": "1.2.0",
1059
- "_view_name": "StyleView",
1060
- "description_width": ""
1061
- }
1062
- },
1063
- "6049860ce9d443d6ad2375ac6002681d": {
1064
- "model_module": "@jupyter-widgets/base",
1065
- "model_name": "LayoutModel",
1066
- "model_module_version": "1.2.0",
1067
- "state": {
1068
- "_model_module": "@jupyter-widgets/base",
1069
- "_model_module_version": "1.2.0",
1070
- "_model_name": "LayoutModel",
1071
- "_view_count": null,
1072
- "_view_module": "@jupyter-widgets/base",
1073
- "_view_module_version": "1.2.0",
1074
- "_view_name": "LayoutView",
1075
- "align_content": null,
1076
- "align_items": null,
1077
- "align_self": null,
1078
- "border": null,
1079
- "bottom": null,
1080
- "display": null,
1081
- "flex": null,
1082
- "flex_flow": null,
1083
- "grid_area": null,
1084
- "grid_auto_columns": null,
1085
- "grid_auto_flow": null,
1086
- "grid_auto_rows": null,
1087
- "grid_column": null,
1088
- "grid_gap": null,
1089
- "grid_row": null,
1090
- "grid_template_areas": null,
1091
- "grid_template_columns": null,
1092
- "grid_template_rows": null,
1093
- "height": null,
1094
- "justify_content": null,
1095
- "justify_items": null,
1096
- "left": null,
1097
- "margin": null,
1098
- "max_height": null,
1099
- "max_width": null,
1100
- "min_height": null,
1101
- "min_width": null,
1102
- "object_fit": null,
1103
- "object_position": null,
1104
- "order": null,
1105
- "overflow": null,
1106
- "overflow_x": null,
1107
- "overflow_y": null,
1108
- "padding": null,
1109
- "right": null,
1110
- "top": null,
1111
- "visibility": null,
1112
- "width": null
1113
- }
1114
- },
1115
- "d10d4cb8f2aa454f914c1d92eb3d5560": {
1116
- "model_module": "@jupyter-widgets/controls",
1117
- "model_name": "ProgressStyleModel",
1118
- "model_module_version": "1.5.0",
1119
- "state": {
1120
- "_model_module": "@jupyter-widgets/controls",
1121
- "_model_module_version": "1.5.0",
1122
- "_model_name": "ProgressStyleModel",
1123
- "_view_count": null,
1124
- "_view_module": "@jupyter-widgets/base",
1125
- "_view_module_version": "1.2.0",
1126
- "_view_name": "StyleView",
1127
- "bar_color": null,
1128
- "description_width": ""
1129
- }
1130
- },
1131
- "7c23282868a64ccebf0abe3e10ee26a7": {
1132
- "model_module": "@jupyter-widgets/base",
1133
- "model_name": "LayoutModel",
1134
- "model_module_version": "1.2.0",
1135
- "state": {
1136
- "_model_module": "@jupyter-widgets/base",
1137
- "_model_module_version": "1.2.0",
1138
- "_model_name": "LayoutModel",
1139
- "_view_count": null,
1140
- "_view_module": "@jupyter-widgets/base",
1141
- "_view_module_version": "1.2.0",
1142
- "_view_name": "LayoutView",
1143
- "align_content": null,
1144
- "align_items": null,
1145
- "align_self": null,
1146
- "border": null,
1147
- "bottom": null,
1148
- "display": null,
1149
- "flex": null,
1150
- "flex_flow": null,
1151
- "grid_area": null,
1152
- "grid_auto_columns": null,
1153
- "grid_auto_flow": null,
1154
- "grid_auto_rows": null,
1155
- "grid_column": null,
1156
- "grid_gap": null,
1157
- "grid_row": null,
1158
- "grid_template_areas": null,
1159
- "grid_template_columns": null,
1160
- "grid_template_rows": null,
1161
- "height": null,
1162
- "justify_content": null,
1163
- "justify_items": null,
1164
- "left": null,
1165
- "margin": null,
1166
- "max_height": null,
1167
- "max_width": null,
1168
- "min_height": null,
1169
- "min_width": null,
1170
- "object_fit": null,
1171
- "object_position": null,
1172
- "order": null,
1173
- "overflow": null,
1174
- "overflow_x": null,
1175
- "overflow_y": null,
1176
- "padding": null,
1177
- "right": null,
1178
- "top": null,
1179
- "visibility": null,
1180
- "width": null
1181
- }
1182
- },
1183
- "7d9f2e91ae8a4417893368e05ecd81bc": {
1184
- "model_module": "@jupyter-widgets/controls",
1185
- "model_name": "DescriptionStyleModel",
1186
- "model_module_version": "1.5.0",
1187
- "state": {
1188
- "_model_module": "@jupyter-widgets/controls",
1189
- "_model_module_version": "1.5.0",
1190
- "_model_name": "DescriptionStyleModel",
1191
- "_view_count": null,
1192
- "_view_module": "@jupyter-widgets/base",
1193
- "_view_module_version": "1.2.0",
1194
- "_view_name": "StyleView",
1195
- "description_width": ""
1196
- }
1197
- },
1198
- "34707c8206e545b7b2d12729790833b1": {
1199
- "model_module": "@jupyter-widgets/controls",
1200
- "model_name": "HBoxModel",
1201
- "model_module_version": "1.5.0",
1202
- "state": {
1203
- "_dom_classes": [],
1204
- "_model_module": "@jupyter-widgets/controls",
1205
- "_model_module_version": "1.5.0",
1206
- "_model_name": "HBoxModel",
1207
- "_view_count": null,
1208
- "_view_module": "@jupyter-widgets/controls",
1209
- "_view_module_version": "1.5.0",
1210
- "_view_name": "HBoxView",
1211
- "box_style": "",
1212
- "children": [
1213
- "IPY_MODEL_55e0c5c479e24c09b0e48eb3fa688fc7",
1214
- "IPY_MODEL_50c15e4c06bc45c38759b7693989661c",
1215
- "IPY_MODEL_2859e4ef1c99467aa24d53e1c2fa5884"
1216
- ],
1217
- "layout": "IPY_MODEL_b96b0da8986744efaf541834e1e53e19"
1218
- }
1219
- },
1220
- "55e0c5c479e24c09b0e48eb3fa688fc7": {
1221
- "model_module": "@jupyter-widgets/controls",
1222
- "model_name": "HTMLModel",
1223
- "model_module_version": "1.5.0",
1224
- "state": {
1225
- "_dom_classes": [],
1226
- "_model_module": "@jupyter-widgets/controls",
1227
- "_model_module_version": "1.5.0",
1228
- "_model_name": "HTMLModel",
1229
- "_view_count": null,
1230
- "_view_module": "@jupyter-widgets/controls",
1231
- "_view_module_version": "1.5.0",
1232
- "_view_name": "HTMLView",
1233
- "description": "",
1234
- "description_tooltip": null,
1235
- "layout": "IPY_MODEL_c53ed16146a24d989b4ee4cf03d3932a",
1236
- "placeholder": "​",
1237
- "style": "IPY_MODEL_e28de7f377fc457295fef27c082d9334",
1238
- "value": "Fetching 1 files: 100%"
1239
- }
1240
- },
1241
- "50c15e4c06bc45c38759b7693989661c": {
1242
- "model_module": "@jupyter-widgets/controls",
1243
- "model_name": "FloatProgressModel",
1244
- "model_module_version": "1.5.0",
1245
- "state": {
1246
- "_dom_classes": [],
1247
- "_model_module": "@jupyter-widgets/controls",
1248
- "_model_module_version": "1.5.0",
1249
- "_model_name": "FloatProgressModel",
1250
- "_view_count": null,
1251
- "_view_module": "@jupyter-widgets/controls",
1252
- "_view_module_version": "1.5.0",
1253
- "_view_name": "ProgressView",
1254
- "bar_style": "success",
1255
- "description": "",
1256
- "description_tooltip": null,
1257
- "layout": "IPY_MODEL_ada39e0694e34f95bdfdab576b153961",
1258
- "max": 1,
1259
- "min": 0,
1260
- "orientation": "horizontal",
1261
- "style": "IPY_MODEL_384ebf941af5426c99ad27d06cf8d8a2",
1262
- "value": 1
1263
- }
1264
- },
1265
- "2859e4ef1c99467aa24d53e1c2fa5884": {
1266
- "model_module": "@jupyter-widgets/controls",
1267
- "model_name": "HTMLModel",
1268
- "model_module_version": "1.5.0",
1269
- "state": {
1270
- "_dom_classes": [],
1271
- "_model_module": "@jupyter-widgets/controls",
1272
- "_model_module_version": "1.5.0",
1273
- "_model_name": "HTMLModel",
1274
- "_view_count": null,
1275
- "_view_module": "@jupyter-widgets/controls",
1276
- "_view_module_version": "1.5.0",
1277
- "_view_name": "HTMLView",
1278
- "description": "",
1279
- "description_tooltip": null,
1280
- "layout": "IPY_MODEL_910c22b8050649f28fde39098cb04f40",
1281
- "placeholder": "​",
1282
- "style": "IPY_MODEL_b1cf637960344d6198a146cc661f736f",
1283
- "value": " 1/1 [00:00&lt;00:00, 67.64it/s]"
1284
- }
1285
- },
1286
- "b96b0da8986744efaf541834e1e53e19": {
1287
- "model_module": "@jupyter-widgets/base",
1288
- "model_name": "LayoutModel",
1289
- "model_module_version": "1.2.0",
1290
- "state": {
1291
- "_model_module": "@jupyter-widgets/base",
1292
- "_model_module_version": "1.2.0",
1293
- "_model_name": "LayoutModel",
1294
- "_view_count": null,
1295
- "_view_module": "@jupyter-widgets/base",
1296
- "_view_module_version": "1.2.0",
1297
- "_view_name": "LayoutView",
1298
- "align_content": null,
1299
- "align_items": null,
1300
- "align_self": null,
1301
- "border": null,
1302
- "bottom": null,
1303
- "display": null,
1304
- "flex": null,
1305
- "flex_flow": null,
1306
- "grid_area": null,
1307
- "grid_auto_columns": null,
1308
- "grid_auto_flow": null,
1309
- "grid_auto_rows": null,
1310
- "grid_column": null,
1311
- "grid_gap": null,
1312
- "grid_row": null,
1313
- "grid_template_areas": null,
1314
- "grid_template_columns": null,
1315
- "grid_template_rows": null,
1316
- "height": null,
1317
- "justify_content": null,
1318
- "justify_items": null,
1319
- "left": null,
1320
- "margin": null,
1321
- "max_height": null,
1322
- "max_width": null,
1323
- "min_height": null,
1324
- "min_width": null,
1325
- "object_fit": null,
1326
- "object_position": null,
1327
- "order": null,
1328
- "overflow": null,
1329
- "overflow_x": null,
1330
- "overflow_y": null,
1331
- "padding": null,
1332
- "right": null,
1333
- "top": null,
1334
- "visibility": null,
1335
- "width": null
1336
- }
1337
- },
1338
- "c53ed16146a24d989b4ee4cf03d3932a": {
1339
- "model_module": "@jupyter-widgets/base",
1340
- "model_name": "LayoutModel",
1341
- "model_module_version": "1.2.0",
1342
- "state": {
1343
- "_model_module": "@jupyter-widgets/base",
1344
- "_model_module_version": "1.2.0",
1345
- "_model_name": "LayoutModel",
1346
- "_view_count": null,
1347
- "_view_module": "@jupyter-widgets/base",
1348
- "_view_module_version": "1.2.0",
1349
- "_view_name": "LayoutView",
1350
- "align_content": null,
1351
- "align_items": null,
1352
- "align_self": null,
1353
- "border": null,
1354
- "bottom": null,
1355
- "display": null,
1356
- "flex": null,
1357
- "flex_flow": null,
1358
- "grid_area": null,
1359
- "grid_auto_columns": null,
1360
- "grid_auto_flow": null,
1361
- "grid_auto_rows": null,
1362
- "grid_column": null,
1363
- "grid_gap": null,
1364
- "grid_row": null,
1365
- "grid_template_areas": null,
1366
- "grid_template_columns": null,
1367
- "grid_template_rows": null,
1368
- "height": null,
1369
- "justify_content": null,
1370
- "justify_items": null,
1371
- "left": null,
1372
- "margin": null,
1373
- "max_height": null,
1374
- "max_width": null,
1375
- "min_height": null,
1376
- "min_width": null,
1377
- "object_fit": null,
1378
- "object_position": null,
1379
- "order": null,
1380
- "overflow": null,
1381
- "overflow_x": null,
1382
- "overflow_y": null,
1383
- "padding": null,
1384
- "right": null,
1385
- "top": null,
1386
- "visibility": null,
1387
- "width": null
1388
- }
1389
- },
1390
- "e28de7f377fc457295fef27c082d9334": {
1391
- "model_module": "@jupyter-widgets/controls",
1392
- "model_name": "DescriptionStyleModel",
1393
- "model_module_version": "1.5.0",
1394
- "state": {
1395
- "_model_module": "@jupyter-widgets/controls",
1396
- "_model_module_version": "1.5.0",
1397
- "_model_name": "DescriptionStyleModel",
1398
- "_view_count": null,
1399
- "_view_module": "@jupyter-widgets/base",
1400
- "_view_module_version": "1.2.0",
1401
- "_view_name": "StyleView",
1402
- "description_width": ""
1403
- }
1404
- },
1405
- "ada39e0694e34f95bdfdab576b153961": {
1406
- "model_module": "@jupyter-widgets/base",
1407
- "model_name": "LayoutModel",
1408
- "model_module_version": "1.2.0",
1409
- "state": {
1410
- "_model_module": "@jupyter-widgets/base",
1411
- "_model_module_version": "1.2.0",
1412
- "_model_name": "LayoutModel",
1413
- "_view_count": null,
1414
- "_view_module": "@jupyter-widgets/base",
1415
- "_view_module_version": "1.2.0",
1416
- "_view_name": "LayoutView",
1417
- "align_content": null,
1418
- "align_items": null,
1419
- "align_self": null,
1420
- "border": null,
1421
- "bottom": null,
1422
- "display": null,
1423
- "flex": null,
1424
- "flex_flow": null,
1425
- "grid_area": null,
1426
- "grid_auto_columns": null,
1427
- "grid_auto_flow": null,
1428
- "grid_auto_rows": null,
1429
- "grid_column": null,
1430
- "grid_gap": null,
1431
- "grid_row": null,
1432
- "grid_template_areas": null,
1433
- "grid_template_columns": null,
1434
- "grid_template_rows": null,
1435
- "height": null,
1436
- "justify_content": null,
1437
- "justify_items": null,
1438
- "left": null,
1439
- "margin": null,
1440
- "max_height": null,
1441
- "max_width": null,
1442
- "min_height": null,
1443
- "min_width": null,
1444
- "object_fit": null,
1445
- "object_position": null,
1446
- "order": null,
1447
- "overflow": null,
1448
- "overflow_x": null,
1449
- "overflow_y": null,
1450
- "padding": null,
1451
- "right": null,
1452
- "top": null,
1453
- "visibility": null,
1454
- "width": null
1455
- }
1456
- },
1457
- "384ebf941af5426c99ad27d06cf8d8a2": {
1458
- "model_module": "@jupyter-widgets/controls",
1459
- "model_name": "ProgressStyleModel",
1460
- "model_module_version": "1.5.0",
1461
- "state": {
1462
- "_model_module": "@jupyter-widgets/controls",
1463
- "_model_module_version": "1.5.0",
1464
- "_model_name": "ProgressStyleModel",
1465
- "_view_count": null,
1466
- "_view_module": "@jupyter-widgets/base",
1467
- "_view_module_version": "1.2.0",
1468
- "_view_name": "StyleView",
1469
- "bar_color": null,
1470
- "description_width": ""
1471
- }
1472
- },
1473
- "910c22b8050649f28fde39098cb04f40": {
1474
- "model_module": "@jupyter-widgets/base",
1475
- "model_name": "LayoutModel",
1476
- "model_module_version": "1.2.0",
1477
- "state": {
1478
- "_model_module": "@jupyter-widgets/base",
1479
- "_model_module_version": "1.2.0",
1480
- "_model_name": "LayoutModel",
1481
- "_view_count": null,
1482
- "_view_module": "@jupyter-widgets/base",
1483
- "_view_module_version": "1.2.0",
1484
- "_view_name": "LayoutView",
1485
- "align_content": null,
1486
- "align_items": null,
1487
- "align_self": null,
1488
- "border": null,
1489
- "bottom": null,
1490
- "display": null,
1491
- "flex": null,
1492
- "flex_flow": null,
1493
- "grid_area": null,
1494
- "grid_auto_columns": null,
1495
- "grid_auto_flow": null,
1496
- "grid_auto_rows": null,
1497
- "grid_column": null,
1498
- "grid_gap": null,
1499
- "grid_row": null,
1500
- "grid_template_areas": null,
1501
- "grid_template_columns": null,
1502
- "grid_template_rows": null,
1503
- "height": null,
1504
- "justify_content": null,
1505
- "justify_items": null,
1506
- "left": null,
1507
- "margin": null,
1508
- "max_height": null,
1509
- "max_width": null,
1510
- "min_height": null,
1511
- "min_width": null,
1512
- "object_fit": null,
1513
- "object_position": null,
1514
- "order": null,
1515
- "overflow": null,
1516
- "overflow_x": null,
1517
- "overflow_y": null,
1518
- "padding": null,
1519
- "right": null,
1520
- "top": null,
1521
- "visibility": null,
1522
- "width": null
1523
- }
1524
- },
1525
- "b1cf637960344d6198a146cc661f736f": {
1526
- "model_module": "@jupyter-widgets/controls",
1527
- "model_name": "DescriptionStyleModel",
1528
- "model_module_version": "1.5.0",
1529
- "state": {
1530
- "_model_module": "@jupyter-widgets/controls",
1531
- "_model_module_version": "1.5.0",
1532
- "_model_name": "DescriptionStyleModel",
1533
- "_view_count": null,
1534
- "_view_module": "@jupyter-widgets/base",
1535
- "_view_module_version": "1.2.0",
1536
- "_view_name": "StyleView",
1537
- "description_width": ""
1538
- }
1539
- }
1540
- }
1541
- },
1542
  "accelerator": "GPU"
1543
  },
1544
  "nbformat": 4,
 
119
  },
120
  {
121
  "cell_type": "code",
122
+ "execution_count": null,
123
  "metadata": {
124
+ "id": "T1dAaJ6ON1Bu"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  },
126
+ "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  "source": [
128
  "import torch\n",
129
  "from transformers import AutoProcessor, AutoModel, infer_device\n",
 
412
  "language_info": {
413
  "name": "python"
414
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  "accelerator": "GPU"
416
  },
417
  "nbformat": 4,