Aspiring Astro commited on
Commit
997e39f
·
1 Parent(s): 06c7cb9

set share to true

Browse files
Files changed (2) hide show
  1. app.ipynb +232 -5
  2. app.py +1 -1
app.ipynb CHANGED
@@ -446,7 +446,7 @@
446
  },
447
  {
448
  "cell_type": "code",
449
- "execution_count": 7,
450
  "id": "a48e7483-c04b-4048-a1ae-34a8c7986a57",
451
  "metadata": {},
452
  "outputs": [
@@ -471,8 +471,144 @@
471
  "output_type": "stream",
472
  "text": [
473
  "Running on local URL: http://127.0.0.1:7860\n",
 
474
  "\n",
475
- "To create a public link, set `share=True` in `launch()`.\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
476
  ]
477
  },
478
  {
@@ -517,8 +653,99 @@
517
  "output_type": "stream",
518
  "text": [
519
  "cheetah TensorBase(1) TensorBase([2.9325e-08, 9.9999e-01, 1.2872e-09, 1.3284e-05, 3.6218e-08,\n",
520
- " 6.6378e-07, 1.2428e-08, 7.0062e-09])\n",
521
- "Keyboard interruption in main thread... closing server.\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  ]
523
  }
524
  ],
@@ -531,7 +758,7 @@
531
  "example_models = [] #list(learners.values())\n",
532
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=example_images, title=title, description=description )\n",
533
  "if __name__ == \"__main__\":\n",
534
- " intf.launch(debug=True, inline=False)\n"
535
  ]
536
  },
537
  {
 
446
  },
447
  {
448
  "cell_type": "code",
449
+ "execution_count": 6,
450
  "id": "a48e7483-c04b-4048-a1ae-34a8c7986a57",
451
  "metadata": {},
452
  "outputs": [
 
471
  "output_type": "stream",
472
  "text": [
473
  "Running on local URL: http://127.0.0.1:7860\n",
474
+ "Running on public URL: https://9569b03a-5208-4edb.gradio.live\n",
475
  "\n",
476
+ "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n"
477
+ ]
478
+ },
479
+ {
480
+ "data": {
481
+ "text/html": [
482
+ "\n",
483
+ "<style>\n",
484
+ " /* Turns off some styling */\n",
485
+ " progress {\n",
486
+ " /* gets rid of default border in Firefox and Opera. */\n",
487
+ " border: none;\n",
488
+ " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
489
+ " background-size: auto;\n",
490
+ " }\n",
491
+ " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
492
+ " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
493
+ " }\n",
494
+ " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
495
+ " background: #F44336;\n",
496
+ " }\n",
497
+ "</style>\n"
498
+ ],
499
+ "text/plain": [
500
+ "<IPython.core.display.HTML object>"
501
+ ]
502
+ },
503
+ "metadata": {},
504
+ "output_type": "display_data"
505
+ },
506
+ {
507
+ "data": {
508
+ "text/html": [],
509
+ "text/plain": [
510
+ "<IPython.core.display.HTML object>"
511
+ ]
512
+ },
513
+ "metadata": {},
514
+ "output_type": "display_data"
515
+ },
516
+ {
517
+ "name": "stdout",
518
+ "output_type": "stream",
519
+ "text": [
520
+ "snow leopard TensorBase(6) TensorBase([1.9796e-07, 5.2659e-07, 1.7047e-04, 2.0246e-07, 1.5801e-08,\n",
521
+ " 5.4288e-06, 9.9982e-01, 6.8012e-09])\n"
522
+ ]
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
+ "name": "stdout",
563
+ "output_type": "stream",
564
+ "text": [
565
+ "african leopard TensorBase(0) TensorBase([9.7809e-01, 1.9370e-03, 5.1859e-04, 1.8196e-05, 1.5251e-02,\n",
566
+ " 1.8402e-04, 3.8208e-03, 1.8130e-04])\n"
567
+ ]
568
+ },
569
+ {
570
+ "data": {
571
+ "text/html": [
572
+ "\n",
573
+ "<style>\n",
574
+ " /* Turns off some styling */\n",
575
+ " progress {\n",
576
+ " /* gets rid of default border in Firefox and Opera. */\n",
577
+ " border: none;\n",
578
+ " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
579
+ " background-size: auto;\n",
580
+ " }\n",
581
+ " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
582
+ " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
583
+ " }\n",
584
+ " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
585
+ " background: #F44336;\n",
586
+ " }\n",
587
+ "</style>\n"
588
+ ],
589
+ "text/plain": [
590
+ "<IPython.core.display.HTML object>"
591
+ ]
592
+ },
593
+ "metadata": {},
594
+ "output_type": "display_data"
595
+ },
596
+ {
597
+ "data": {
598
+ "text/html": [],
599
+ "text/plain": [
600
+ "<IPython.core.display.HTML object>"
601
+ ]
602
+ },
603
+ "metadata": {},
604
+ "output_type": "display_data"
605
+ },
606
+ {
607
+ "name": "stdout",
608
+ "output_type": "stream",
609
+ "text": [
610
+ "tiger TensorBase(7) TensorBase([2.0140e-08, 3.2289e-10, 3.0278e-07, 1.7037e-07, 2.8471e-08,\n",
611
+ " 3.1560e-08, 5.5170e-08, 1.0000e+00])\n"
612
  ]
613
  },
614
  {
 
653
  "output_type": "stream",
654
  "text": [
655
  "cheetah TensorBase(1) TensorBase([2.9325e-08, 9.9999e-01, 1.2872e-09, 1.3284e-05, 3.6218e-08,\n",
656
+ " 6.6378e-07, 1.2428e-08, 7.0062e-09])\n"
657
+ ]
658
+ },
659
+ {
660
+ "data": {
661
+ "text/html": [
662
+ "\n",
663
+ "<style>\n",
664
+ " /* Turns off some styling */\n",
665
+ " progress {\n",
666
+ " /* gets rid of default border in Firefox and Opera. */\n",
667
+ " border: none;\n",
668
+ " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
669
+ " background-size: auto;\n",
670
+ " }\n",
671
+ " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
672
+ " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
673
+ " }\n",
674
+ " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
675
+ " background: #F44336;\n",
676
+ " }\n",
677
+ "</style>\n"
678
+ ],
679
+ "text/plain": [
680
+ "<IPython.core.display.HTML object>"
681
+ ]
682
+ },
683
+ "metadata": {},
684
+ "output_type": "display_data"
685
+ },
686
+ {
687
+ "data": {
688
+ "text/html": [],
689
+ "text/plain": [
690
+ "<IPython.core.display.HTML object>"
691
+ ]
692
+ },
693
+ "metadata": {},
694
+ "output_type": "display_data"
695
+ },
696
+ {
697
+ "name": "stdout",
698
+ "output_type": "stream",
699
+ "text": [
700
+ "clouded leopard TensorBase(2) TensorBase([3.5035e-05, 2.8548e-06, 9.9938e-01, 1.8297e-06, 5.6521e-04,\n",
701
+ " 1.3141e-06, 7.5178e-06, 1.0570e-05])\n"
702
+ ]
703
+ },
704
+ {
705
+ "data": {
706
+ "text/html": [
707
+ "\n",
708
+ "<style>\n",
709
+ " /* Turns off some styling */\n",
710
+ " progress {\n",
711
+ " /* gets rid of default border in Firefox and Opera. */\n",
712
+ " border: none;\n",
713
+ " /* Needs to be in here for Safari polyfill so background images work as expected. */\n",
714
+ " background-size: auto;\n",
715
+ " }\n",
716
+ " progress:not([value]), progress:not([value])::-webkit-progress-bar {\n",
717
+ " background: repeating-linear-gradient(45deg, #7e7e7e, #7e7e7e 10px, #5c5c5c 10px, #5c5c5c 20px);\n",
718
+ " }\n",
719
+ " .progress-bar-interrupted, .progress-bar-interrupted::-webkit-progress-bar {\n",
720
+ " background: #F44336;\n",
721
+ " }\n",
722
+ "</style>\n"
723
+ ],
724
+ "text/plain": [
725
+ "<IPython.core.display.HTML object>"
726
+ ]
727
+ },
728
+ "metadata": {},
729
+ "output_type": "display_data"
730
+ },
731
+ {
732
+ "data": {
733
+ "text/html": [],
734
+ "text/plain": [
735
+ "<IPython.core.display.HTML object>"
736
+ ]
737
+ },
738
+ "metadata": {},
739
+ "output_type": "display_data"
740
+ },
741
+ {
742
+ "name": "stdout",
743
+ "output_type": "stream",
744
+ "text": [
745
+ "cougar TensorBase(3) TensorBase([7.7202e-04, 9.6453e-05, 3.6239e-04, 9.9550e-01, 5.8073e-04,\n",
746
+ " 1.0296e-03, 1.6978e-04, 1.4883e-03])\n",
747
+ "Keyboard interruption in main thread... closing server.\n",
748
+ "Killing tunnel 127.0.0.1:7860 <> https://9569b03a-5208-4edb.gradio.live\n"
749
  ]
750
  }
751
  ],
 
758
  "example_models = [] #list(learners.values())\n",
759
  "intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=example_images, title=title, description=description )\n",
760
  "if __name__ == \"__main__\":\n",
761
+ " intf.launch(debug=True, inline=False, share=True)\n"
762
  ]
763
  },
764
  {
app.py CHANGED
@@ -38,5 +38,5 @@ example_images = [ 'cheetah.jpg', 'jaguar.jpg', 'tiger.jpg', 'cougar.jpg', 'lion
38
  example_models = [] #list(learners.values())
39
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=example_images, title=title, description=description )
40
  if __name__ == "__main__":
41
- intf.launch(debug=True, inline=False)
42
 
 
38
  example_models = [] #list(learners.values())
39
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=example_images, title=title, description=description )
40
  if __name__ == "__main__":
41
+ intf.launch(debug=True, inline=False, share=True)
42