diff --git a/.gitattributes b/.gitattributes index 7e6a03140475a3f16b26600d58278d9b57f2d2ec..bee3b76f52bd1a1d4e5ab45275c9706ec4e16d14 100644 --- a/.gitattributes +++ b/.gitattributes @@ -252,3 +252,91 @@ Emu/Emu2/examples/emu.png filter=lfs diff=lfs merge=lfs -text Emu/Emu2/examples/shapes.jpeg filter=lfs diff=lfs merge=lfs -text Emu/Emu2/examples/dog.jpg filter=lfs diff=lfs merge=lfs -text Emu/Emu1/assets/Emu.png filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/assets/generalist.png filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/examples/sunflower.png filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/examples/panda.png filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/examples/dog.png filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/examples/AppleVR.mp4 filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/examples/oil_sunflower.jpg filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_audio.mp3 filter=lfs diff=lfs merge=lfs -text +Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_video.mp4 filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/box_demo.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/wechat_qrcode.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/progress.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/flow_warp_diff.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/flow_warp.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/flow_raw_images.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/zhihu_qrcode.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/docs/en/_static/community/3.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/.ninja_deps filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/mmcv/ops/csrc/pytorch/cuda/cudabind.o filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/tests/data/palette.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/tests/data/uint16-5channel.tif filter=lfs diff=lfs merge=lfs -text +groundingLMM/mmcv/tests/data/test.mp4 filter=lfs diff=lfs merge=lfs -text +groundingLMM/LLaVA/images/llava_v1_5_radar.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/LLaVA/images/llava_logo.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/LLaVA/images/llava_example_cmp.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/LLaVA/images/demo_cli.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/logos/face.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/surfer.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/mansion.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/beetle.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/tokyo.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/balloon.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/church.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/joker.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/old.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/joker_old.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/snow.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/paddle.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/yacht.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/elephant.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/demo_resources/japan.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/tables/ReferSeg_Table.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/tables/GCG_Table.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/dataset_pipeline.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/grand_sample_1.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/model_arch.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_2_downstream.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/grand_sample_2.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_3_refseg.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_5_conv.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_6_cap.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_4_conv.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_4_regcap.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/grand_f_samples.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_1_gcg.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/images/glamm/results_7_gcg_combined.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/readme_files/header-image.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/test/test_files/video_sample.ogg filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/test/test_files/playable_but_bad_container.mkv filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/test/test_files/video_sample.webm filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/test/test_files/video_sample.mp4 filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/test/golden/image_mod/cheetah1.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/website/homepage/src/assets/img/meta-image.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/website/homepage/src/assets/img/header-image.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/js/workbench/src/assets/cantina.wav filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/js/app/public/static/img/Duck.glb filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/guides/assets/hf_demo.mp4 filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/guides/assets/annotated.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/guides/assets/flagging-callback-hf.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/webcam/screenshot.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/sepia_filter/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/sales_projections/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/hello_world_2/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/hello_world/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/spectogram/screenshot.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/stock_forecast/screenshot.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/color_picker/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/blocks_flipper/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/animeganv2/groot.jpeg filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/hello_world_3/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/calculator_live/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/image_mod/screenshot.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/Echocardiogram-Segmentation/img2.jpg filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/image_classifier/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/image_classifier/screenshot.png filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/calculator/screenshot.gif filter=lfs diff=lfs merge=lfs -text +groundingLMM/gradio-dev/demo/video_identity/screenshot.png filter=lfs diff=lfs merge=lfs -text diff --git a/Emu/Emu1/assets/generalist.png b/Emu/Emu1/assets/generalist.png new file mode 100644 index 0000000000000000000000000000000000000000..b81988dc9d828b64cd07a560d111350190c13005 --- /dev/null +++ b/Emu/Emu1/assets/generalist.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6738ca596ad02203e0846ce0dbf5ba5e48cb3d72deea90ee6ac8fa14cd6c2b63 +size 3267802 diff --git a/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/benchmark/benchmark_vids.parquet b/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/benchmark/benchmark_vids.parquet new file mode 100644 index 0000000000000000000000000000000000000000..04305677e0b0dd330ac968bbb44203e6b52cf6da --- /dev/null +++ b/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/benchmark/benchmark_vids.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9494b8e91351aad8dda22712dfdd2611d483eabc8ed23429445405ec9ec9ab24 +size 48934 diff --git a/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_audio.mp3 b/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_audio.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..d40536d03b3d22dc32a8701fb1119deeb10d45bb --- /dev/null +++ b/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_audio.mp3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed92db32c3a6826502ffd600e778d01ae6317b36fb1fe1c7bbffb0f0870059ea +size 2406693 diff --git a/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_video.mp4 b/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_video.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..245048e6dc6329fa19d69fa5ae655fe0fa6f75f8 --- /dev/null +++ b/Emu/Emu1/data/yt-sb-1b/video2dataset-1.1.0/tests/test_files/test_video.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3075ae64193919325c7c8a33117f8d2bc98579f76c1920b8ebe6abeff857c48f +size 4090211 diff --git a/Emu/Emu1/examples/AppleVR.mp4 b/Emu/Emu1/examples/AppleVR.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..24d09cd68ad1fc4f10e317657fb9c7d65bbc6152 --- /dev/null +++ b/Emu/Emu1/examples/AppleVR.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9869d2309cbcba84064813e56e3fe746ed41d35ecf55e39904acf83448ecec7f +size 3469070 diff --git a/Emu/Emu1/examples/dog.png b/Emu/Emu1/examples/dog.png new file mode 100644 index 0000000000000000000000000000000000000000..161e00646143ad7adc9d65ccd076149d95d6fe4e --- /dev/null +++ b/Emu/Emu1/examples/dog.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b623861fc2176f6ad6d596417ed82a1cefd3f264b288fcdb26fa58dc55895183 +size 1275947 diff --git a/Emu/Emu1/examples/oil_sunflower.jpg b/Emu/Emu1/examples/oil_sunflower.jpg new file mode 100644 index 0000000000000000000000000000000000000000..88fcc3b733ec6a7f846b1a94f1def850c2b1d1b8 --- /dev/null +++ b/Emu/Emu1/examples/oil_sunflower.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c244728525468b6a50d90827c281ee6b1a7b65e2f3488b4e70f2001ee7d24d67 +size 200708 diff --git a/Emu/Emu1/examples/panda.png b/Emu/Emu1/examples/panda.png new file mode 100644 index 0000000000000000000000000000000000000000..cc9c1b01da8ff7630cc16a4f324eedf4be353341 --- /dev/null +++ b/Emu/Emu1/examples/panda.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5c335f0b46bd4f0aed771e1aecfa5ce2d067b186e76fdb81407805d73853ede +size 285364 diff --git a/Emu/Emu1/examples/sunflower.png b/Emu/Emu1/examples/sunflower.png new file mode 100644 index 0000000000000000000000000000000000000000..e49d433b4bf3f43fed13b6c08062382786b6cd33 --- /dev/null +++ b/Emu/Emu1/examples/sunflower.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0f836deadeac13e53e8b19c1c5e173f6df43c29eed13f854e65628076b4df47 +size 918485 diff --git a/Emu/Emu1/models/llama_config/tokenizer.model b/Emu/Emu1/models/llama_config/tokenizer.model new file mode 100644 index 0000000000000000000000000000000000000000..6c00c742ce03c627d6cd5b795984876fa49fa899 --- /dev/null +++ b/Emu/Emu1/models/llama_config/tokenizer.model @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347 +size 499723 diff --git a/groundingLMM/GLaMM-FullScope/.ipynb_checkpoints/tokenizer-checkpoint.model b/groundingLMM/GLaMM-FullScope/.ipynb_checkpoints/tokenizer-checkpoint.model new file mode 100644 index 0000000000000000000000000000000000000000..1b44ca756599180589a427ff2dfa1cbe42110a84 --- /dev/null +++ b/groundingLMM/GLaMM-FullScope/.ipynb_checkpoints/tokenizer-checkpoint.model @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a8f238a200be6c23fbba0f9a999ab4fe3c09ca303b29805e68cf6659bfb7d89 +size 131 diff --git a/groundingLMM/GLaMM-FullScope/pytorch_model-00001-of-00002.bin b/groundingLMM/GLaMM-FullScope/pytorch_model-00001-of-00002.bin new file mode 100644 index 0000000000000000000000000000000000000000..eba31cac740eb72400cb827a6466d99db95964e9 --- /dev/null +++ b/groundingLMM/GLaMM-FullScope/pytorch_model-00001-of-00002.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:508524edd1e9b3630560aced18a0fb3bb59a46e2d8b640bd184dcd02e5254d75 +size 135 diff --git a/groundingLMM/GLaMM-FullScope/pytorch_model-00002-of-00002.bin b/groundingLMM/GLaMM-FullScope/pytorch_model-00002-of-00002.bin new file mode 100644 index 0000000000000000000000000000000000000000..188151d65b2dcbc1c9c89690ec2bfe5c7f130a2d --- /dev/null +++ b/groundingLMM/GLaMM-FullScope/pytorch_model-00002-of-00002.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fccfa2b9cdc0f12382ec6454c80e50fd426a9b24b25792db64f13bb295e6a08e +size 135 diff --git a/groundingLMM/GLaMM-FullScope/tokenizer.model b/groundingLMM/GLaMM-FullScope/tokenizer.model new file mode 100644 index 0000000000000000000000000000000000000000..1b44ca756599180589a427ff2dfa1cbe42110a84 --- /dev/null +++ b/groundingLMM/GLaMM-FullScope/tokenizer.model @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a8f238a200be6c23fbba0f9a999ab4fe3c09ca303b29805e68cf6659bfb7d89 +size 131 diff --git a/groundingLMM/GranD/level_1_inference/9_ov_sam/ext/open_clip/bpe_simple_vocab_16e6.txt.gz b/groundingLMM/GranD/level_1_inference/9_ov_sam/ext/open_clip/bpe_simple_vocab_16e6.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..36a15856e00a06a9fbed8cdd34d2393fea4a3113 --- /dev/null +++ b/groundingLMM/GranD/level_1_inference/9_ov_sam/ext/open_clip/bpe_simple_vocab_16e6.txt.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:924691ac288e54409236115652ad4aa250f48203de50a9e4722a6ecd48d6804a +size 1356917 diff --git a/groundingLMM/GranD/level_2_inference/5_label_assignment/eva_clip/bpe_simple_vocab_16e6.txt.gz b/groundingLMM/GranD/level_2_inference/5_label_assignment/eva_clip/bpe_simple_vocab_16e6.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..36a15856e00a06a9fbed8cdd34d2393fea4a3113 --- /dev/null +++ b/groundingLMM/GranD/level_2_inference/5_label_assignment/eva_clip/bpe_simple_vocab_16e6.txt.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:924691ac288e54409236115652ad4aa250f48203de50a9e4722a6ecd48d6804a +size 1356917 diff --git a/groundingLMM/LLaVA/images/demo_cli.gif b/groundingLMM/LLaVA/images/demo_cli.gif new file mode 100644 index 0000000000000000000000000000000000000000..7415fabbfc29c6a228a44a87069c5f342ba594f2 --- /dev/null +++ b/groundingLMM/LLaVA/images/demo_cli.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09227563f4fe04f077587eeb7b7c33ace2fbb8830e6cc9cfce03a25a57c43bfe +size 10049954 diff --git a/groundingLMM/LLaVA/images/llava_example_cmp.png b/groundingLMM/LLaVA/images/llava_example_cmp.png new file mode 100644 index 0000000000000000000000000000000000000000..c7d8a7c01e8a59affa848c39c588a2e9594f827c --- /dev/null +++ b/groundingLMM/LLaVA/images/llava_example_cmp.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:722b358a3ea285deedda3c9d278390f8f5cbb0b5e924465248f458c4d7aa1c51 +size 324455 diff --git a/groundingLMM/LLaVA/images/llava_logo.png b/groundingLMM/LLaVA/images/llava_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..30158617a7a7131524a9f7fc605c8ae2593c2a31 --- /dev/null +++ b/groundingLMM/LLaVA/images/llava_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49324ed27269d31bd05f94fec215555ada39e4e75e6d6b69aa3896ed90bce759 +size 268316 diff --git a/groundingLMM/LLaVA/images/llava_v1_5_radar.jpg b/groundingLMM/LLaVA/images/llava_v1_5_radar.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8a15425668167b11e35721f046c8eac3797a443 --- /dev/null +++ b/groundingLMM/LLaVA/images/llava_v1_5_radar.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f6f7f4385da27b0fbc9eb466a04db20013f53f0ab5e28cd4483e0b59d17def0 +size 102645 diff --git a/groundingLMM/gradio-dev/GLaMM-FullScope/pytorch_model-00001-of-00002.bin b/groundingLMM/gradio-dev/GLaMM-FullScope/pytorch_model-00001-of-00002.bin new file mode 100644 index 0000000000000000000000000000000000000000..eba31cac740eb72400cb827a6466d99db95964e9 --- /dev/null +++ b/groundingLMM/gradio-dev/GLaMM-FullScope/pytorch_model-00001-of-00002.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:508524edd1e9b3630560aced18a0fb3bb59a46e2d8b640bd184dcd02e5254d75 +size 135 diff --git a/groundingLMM/gradio-dev/GLaMM-FullScope/pytorch_model-00002-of-00002.bin b/groundingLMM/gradio-dev/GLaMM-FullScope/pytorch_model-00002-of-00002.bin new file mode 100644 index 0000000000000000000000000000000000000000..188151d65b2dcbc1c9c89690ec2bfe5c7f130a2d --- /dev/null +++ b/groundingLMM/gradio-dev/GLaMM-FullScope/pytorch_model-00002-of-00002.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fccfa2b9cdc0f12382ec6454c80e50fd426a9b24b25792db64f13bb295e6a08e +size 135 diff --git a/groundingLMM/gradio-dev/GLaMM-FullScope/tokenizer.model b/groundingLMM/gradio-dev/GLaMM-FullScope/tokenizer.model new file mode 100644 index 0000000000000000000000000000000000000000..1b44ca756599180589a427ff2dfa1cbe42110a84 --- /dev/null +++ b/groundingLMM/gradio-dev/GLaMM-FullScope/tokenizer.model @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a8f238a200be6c23fbba0f9a999ab4fe3c09ca303b29805e68cf6659bfb7d89 +size 131 diff --git a/groundingLMM/gradio-dev/box_demo.gif b/groundingLMM/gradio-dev/box_demo.gif new file mode 100644 index 0000000000000000000000000000000000000000..3df767056fe4ab6e66f9ce2ce839479bb3cf92af --- /dev/null +++ b/groundingLMM/gradio-dev/box_demo.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22af0c7ee6f0e1f112003fd422eab3f6bd5ec2e2a0be4c592009024e7714cb7b +size 366563 diff --git a/groundingLMM/gradio-dev/demo/Echocardiogram-Segmentation/img2.jpg b/groundingLMM/gradio-dev/demo/Echocardiogram-Segmentation/img2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3c332a47d44724e33cb267f13970a91b76e9ece4 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/Echocardiogram-Segmentation/img2.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb163302574d298051b63aa6adec389dbe1c7dc94814ef3a05ebfbd697173ef3 +size 105690 diff --git a/groundingLMM/gradio-dev/demo/all_demos/tmp.zip b/groundingLMM/gradio-dev/demo/all_demos/tmp.zip new file mode 100644 index 0000000000000000000000000000000000000000..2ecd58def9427fc9fda765ea34873d43f4a9e554 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/all_demos/tmp.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3f385135e9c9b37cd546c01acb64d4a4aae431450c86a75a649e9e8cf5a538d +size 184378 diff --git a/groundingLMM/gradio-dev/demo/animeganv2/groot.jpeg b/groundingLMM/gradio-dev/demo/animeganv2/groot.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8acab6867dc63bd97a4c14bc8c1ed6ad3f9aed4a --- /dev/null +++ b/groundingLMM/gradio-dev/demo/animeganv2/groot.jpeg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fff4d05d30088da0f073ae4ab21d22d11cbd56cfab711f3c359faabbf8577076 +size 349746 diff --git a/groundingLMM/gradio-dev/demo/blocks_component_shortcut/run.py b/groundingLMM/gradio-dev/demo/blocks_component_shortcut/run.py new file mode 100644 index 0000000000000000000000000000000000000000..6e0b2f6a33001f69eecb813d327b7e1d9e804d39 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_component_shortcut/run.py @@ -0,0 +1,31 @@ +import gradio as gr + + +def greet(str): + return str + + +with gr.Blocks() as demo: + """ + You can make use of str shortcuts you use in Interface within Blocks as well. + + Interface shortcut example: + Interface(greet, "textarea", "textarea") + + You can use + 1. gr.component() + 2. gr.templates.Template() + 3. gr.Template() + All the templates are listed in gradio/templates.py + """ + with gr.Row(): + text1 = gr.component("textarea") + text2 = gr.TextArea() + text3 = gr.templates.TextArea() + text1.blur(greet, text1, text2) + text2.blur(greet, text2, text3) + text3.blur(greet, text3, text1) + button = gr.component("button") + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/blocks_flipper/screenshot.gif b/groundingLMM/gradio-dev/demo/blocks_flipper/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..84562331deddcbec95680423b5eb1c1129d482e3 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_flipper/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21b814857d694e576b3e6db4cabe069f56e7386f7a1fabc6be81431c7176d700 +size 1108151 diff --git a/groundingLMM/gradio-dev/demo/blocks_layout/run.ipynb b/groundingLMM/gradio-dev/demo/blocks_layout/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..557419298eaebb4a0177df9b692b1cc7a52e684e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_layout/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_layout"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "\n", "demo = gr.Blocks()\n", "\n", "with demo:\n", " with gr.Row():\n", " gr.Image(interactive=True, scale=2)\n", " gr.Image()\n", " with gr.Row():\n", " gr.Textbox(label=\"Text\")\n", " gr.Number(label=\"Count\", scale=2)\n", " gr.Radio(choices=[\"One\", \"Two\"])\n", " with gr.Row():\n", " gr.Button(\"500\", scale=0, min_width=500)\n", " gr.Button(\"A\").style(full_width=False)\n", " gr.Button(\"grow\")\n", " with gr.Row():\n", " gr.Textbox()\n", " gr.Textbox()\n", " gr.Button() \n", " with gr.Row():\n", " with gr.Row():\n", " with gr.Column():\n", " gr.Textbox(label=\"Text\")\n", " gr.Number(label=\"Count\")\n", " gr.Radio(choices=[\"One\", \"Two\"])\n", " gr.Image()\n", " with gr.Column():\n", " gr.Image(interactive=True)\n", " gr.Image()\n", " gr.Image()\n", " gr.Textbox(label=\"Text\")\n", " gr.Number(label=\"Count\")\n", " gr.Radio(choices=[\"One\", \"Two\"])\n", "\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_layout/run.py b/groundingLMM/gradio-dev/demo/blocks_layout/run.py new file mode 100644 index 0000000000000000000000000000000000000000..431e86bb0bb19594f4d101e31860e3911399dd7c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_layout/run.py @@ -0,0 +1,39 @@ +import gradio as gr + + +demo = gr.Blocks() + +with demo: + with gr.Row(): + gr.Image(interactive=True, scale=2) + gr.Image() + with gr.Row(): + gr.Textbox(label="Text") + gr.Number(label="Count", scale=2) + gr.Radio(choices=["One", "Two"]) + with gr.Row(): + gr.Button("500", scale=0, min_width=500) + gr.Button("A").style(full_width=False) + gr.Button("grow") + with gr.Row(): + gr.Textbox() + gr.Textbox() + gr.Button() + with gr.Row(): + with gr.Row(): + with gr.Column(): + gr.Textbox(label="Text") + gr.Number(label="Count") + gr.Radio(choices=["One", "Two"]) + gr.Image() + with gr.Column(): + gr.Image(interactive=True) + gr.Image() + gr.Image() + gr.Textbox(label="Text") + gr.Number(label="Count") + gr.Radio(choices=["One", "Two"]) + + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/requirements.txt b/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5cb63bcc8c366f4abc569ed8ef379a90d4759ff4 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/requirements.txt @@ -0,0 +1,2 @@ +plotly +pypistats \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/run.ipynb b/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..5f55239e0e9b64ffffe7a2810b79d2b895818257 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_multiple_event_triggers"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio plotly pypistats"]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import pypistats\n", "from datetime import date\n", "from dateutil.relativedelta import relativedelta\n", "import pandas as pd\n", "\n", "def get_plot(lib, time):\n", " data = pypistats.overall(lib, total=True, format=\"pandas\")\n", " data = data.groupby(\"category\").get_group(\"with_mirrors\").sort_values(\"date\")\n", " start_date = date.today() - relativedelta(months=int(time.split(\" \")[0]))\n", " data = data[(data['date'] > str(start_date))]\n", " data.date = pd.to_datetime(pd.to_datetime(data.date))\n", " return gr.LinePlot.update(value=data, x=\"date\", y=\"downloads\",\n", " tooltip=['date', 'downloads'],\n", " title=f\"Pypi downloads of {lib} over last {time}\",\n", " overlay_point=True,\n", " height=400,\n", " width=900)\n", "\n", "\n", "with gr.Blocks() as demo:\n", " gr.Markdown(\n", " \"\"\"\n", " ## Pypi Download Stats \ud83d\udcc8\n", " See live download stats for all of Hugging Face's open-source libraries \ud83e\udd17\n", " \"\"\")\n", " with gr.Row():\n", " lib = gr.Dropdown([\"transformers\", \"datasets\", \"huggingface-hub\", \"gradio\", \"accelerate\"],\n", " value=\"gradio\", label=\"Library\")\n", " time = gr.Dropdown([\"3 months\", \"6 months\", \"9 months\", \"12 months\"],\n", " value=\"3 months\", label=\"Downloads over the last...\")\n", "\n", " plt = gr.LinePlot()\n", " # You can add multiple event triggers in 2 lines like this\n", " for event in [lib.change, time.change, demo.load]:\n", " event(get_plot, [lib, time], [plt])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/run.py b/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/run.py new file mode 100644 index 0000000000000000000000000000000000000000..598fbee371b7792a94543549bb910436383982de --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_multiple_event_triggers/run.py @@ -0,0 +1,39 @@ +import gradio as gr +import pypistats +from datetime import date +from dateutil.relativedelta import relativedelta +import pandas as pd + +def get_plot(lib, time): + data = pypistats.overall(lib, total=True, format="pandas") + data = data.groupby("category").get_group("with_mirrors").sort_values("date") + start_date = date.today() - relativedelta(months=int(time.split(" ")[0])) + data = data[(data['date'] > str(start_date))] + data.date = pd.to_datetime(pd.to_datetime(data.date)) + return gr.LinePlot.update(value=data, x="date", y="downloads", + tooltip=['date', 'downloads'], + title=f"Pypi downloads of {lib} over last {time}", + overlay_point=True, + height=400, + width=900) + + +with gr.Blocks() as demo: + gr.Markdown( + """ + ## Pypi Download Stats 📈 + See live download stats for all of Hugging Face's open-source libraries 🤗 + """) + with gr.Row(): + lib = gr.Dropdown(["transformers", "datasets", "huggingface-hub", "gradio", "accelerate"], + value="gradio", label="Library") + time = gr.Dropdown(["3 months", "6 months", "9 months", "12 months"], + value="3 months", label="Downloads over the last...") + + plt = gr.LinePlot() + # You can add multiple event triggers in 2 lines like this + for event in [lib.change, time.change, demo.load]: + event(get_plot, [lib, time], [plt]) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/blocks_neural_instrument_coding/run.ipynb b/groundingLMM/gradio-dev/demo/blocks_neural_instrument_coding/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..c0ed94376531f5d902abcaccb8056ca3e0e61a88 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_neural_instrument_coding/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_neural_instrument_coding"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/flute.wav\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/new-sax-1.mp3\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/new-sax-1.wav\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/new-sax.wav\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/sax.wav\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/sax2.wav\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_neural_instrument_coding/trombone.wav"]}, {"cell_type": "code", "execution_count": null, "id": 44380577570523278879349135829904343037, "metadata": {}, "outputs": [], "source": ["# A Blocks implementation of https://erlj.notion.site/Neural-Instrument-Cloning-from-very-few-samples-2cf41d8b630842ee8c7eb55036a1bfd6\n", "\n", "import datetime\n", "import os\n", "import random\n", "\n", "import gradio as gr\n", "from gradio.components import Markdown as m\n", "\n", "\n", "def get_time():\n", " now = datetime.datetime.now()\n", " return now.strftime(\"%m/%d/%Y, %H:%M:%S\")\n", "\n", "\n", "def generate_recording():\n", " return random.choice([\"new-sax-1.mp3\", \"new-sax-1.wav\"])\n", "\n", "\n", "def reconstruct(audio):\n", " return random.choice([\"new-sax-1.mp3\", \"new-sax-1.wav\"])\n", "\n", "\n", "io1 = gr.Interface(\n", " lambda x, y, z: os.path.join(os.path.abspath(''),\"sax.wav\"),\n", " [\n", " gr.Slider(label=\"pitch\"),\n", " gr.Slider(label=\"loudness\"),\n", " gr.Audio(label=\"base audio file (optional)\"),\n", " ],\n", " gr.Audio(),\n", ")\n", "\n", "io2 = gr.Interface(\n", " lambda x, y, z: os.path.join(os.path.abspath(''),\"flute.wav\"),\n", " [\n", " gr.Slider(label=\"pitch\"),\n", " gr.Slider(label=\"loudness\"),\n", " gr.Audio(label=\"base audio file (optional)\"),\n", " ],\n", " gr.Audio(),\n", ")\n", "\n", "io3 = gr.Interface(\n", " lambda x, y, z: os.path.join(os.path.abspath(''),\"trombone.wav\"),\n", " [\n", " gr.Slider(label=\"pitch\"),\n", " gr.Slider(label=\"loudness\"),\n", " gr.Audio(label=\"base audio file (optional)\"),\n", " ],\n", " gr.Audio(),\n", ")\n", "\n", "io4 = gr.Interface(\n", " lambda x, y, z: os.path.join(os.path.abspath(''),\"sax2.wav\"),\n", " [\n", " gr.Slider(label=\"pitch\"),\n", " gr.Slider(label=\"loudness\"),\n", " gr.Audio(label=\"base audio file (optional)\"),\n", " ],\n", " gr.Audio(),\n", ")\n", "\n", "demo = gr.Blocks(title=\"Neural Instrument Cloning\")\n", "\n", "with demo.clear():\n", " m(\n", " \"\"\"\n", " ## Neural Instrument Cloning from Very Few Samples\n", "
\"\"\"\n", " )\n", " m(\n", " \"\"\"\n", " This Blocks implementation is an adaptation [a report written](https://erlj.notion.site/Neural-Instrument-Cloning-from-very-few-samples-2cf41d8b630842ee8c7eb55036a1bfd6) by Nicolas Jonason and Bob L.T. Sturm.\n", " \n", " I've implemented it in Blocks to show off some cool features, such as embedding live ML demos. More on that ahead...\n", " \n", " ### What does this machine learning model do?\n", " It combines techniques from neural voice cloning with musical instrument synthesis. This makes it possible to produce neural instrument synthesisers from just seconds of target instrument audio.\n", " \n", " ### Audio Examples\n", " Here are some **real** 16 second saxophone recordings:\n", " \"\"\"\n", " )\n", " gr.Audio(os.path.join(os.path.abspath(''),\"sax.wav\"), label=\"Here is a real 16 second saxophone recording:\")\n", " gr.Audio(os.path.join(os.path.abspath(''),\"sax.wav\"))\n", "\n", " m(\n", " \"\"\"\\n\n", " Here is a **generated** saxophone recordings:\"\"\"\n", " )\n", " a = gr.Audio(os.path.join(os.path.abspath(''),\"new-sax.wav\"))\n", "\n", " gr.Button(\"Generate a new saxophone recording\")\n", "\n", " m(\n", " \"\"\"\n", " ### Inputs to the model\n", " The inputs to the model are:\n", " * pitch\n", " * loudness\n", " * base audio file\n", " \"\"\"\n", " )\n", "\n", " m(\n", " \"\"\"\n", " Try the model live!\n", " \"\"\"\n", " )\n", "\n", " gr.TabbedInterface(\n", " [io1, io2, io3, io4], [\"Saxophone\", \"Flute\", \"Trombone\", \"Another Saxophone\"]\n", " )\n", "\n", " m(\n", " \"\"\"\n", " ### Using the model for cloning\n", " You can also use this model a different way, to simply clone the audio file and reconstruct it \n", " using machine learning. Here, we'll show a demo of that below:\n", " \"\"\"\n", " )\n", "\n", " a2 = gr.Audio()\n", " a2.change(reconstruct, a2, a2)\n", "\n", " m(\n", " \"\"\"\n", " Thanks for reading this! As you may have realized, all of the \"models\" in this demo are fake. They are just designed to show you what is possible using Blocks \ud83e\udd17.\n", " \n", " For details of the model, read the [original report here](https://erlj.notion.site/Neural-Instrument-Cloning-from-very-few-samples-2cf41d8b630842ee8c7eb55036a1bfd6).\n", " \n", " *Details for nerds*: this report was \"launched\" on:\n", " \"\"\"\n", " )\n", "\n", " t = gr.Textbox(label=\"timestamp\")\n", "\n", " demo.load(get_time, [], t)\n", "\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_scroll/run.ipynb b/groundingLMM/gradio-dev/demo/blocks_scroll/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..6bcf0dcdeecaf95d51894911870493e932cf7d33 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_scroll/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_scroll"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "\n", "demo = gr.Blocks()\n", "\n", "with demo:\n", " inp = gr.Textbox(placeholder=\"Enter text.\")\n", " scroll_btn = gr.Button(\"Scroll\")\n", " no_scroll_btn = gr.Button(\"No Scroll\")\n", " big_block = gr.HTML(\"\"\"\n", "
\n", " \"\"\")\n", " out = gr.Textbox()\n", " \n", " scroll_btn.click(lambda x: x, \n", " inputs=inp, \n", " outputs=out,\n", " scroll_to_output=True)\n", " no_scroll_btn.click(lambda x: x, \n", " inputs=inp, \n", " outputs=out)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_scroll/run.py b/groundingLMM/gradio-dev/demo/blocks_scroll/run.py new file mode 100644 index 0000000000000000000000000000000000000000..2b2194dfb8050fc2a50b9491f2e57f672289ffe7 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_scroll/run.py @@ -0,0 +1,24 @@ +import gradio as gr + + +demo = gr.Blocks() + +with demo: + inp = gr.Textbox(placeholder="Enter text.") + scroll_btn = gr.Button("Scroll") + no_scroll_btn = gr.Button("No Scroll") + big_block = gr.HTML(""" +
+ """) + out = gr.Textbox() + + scroll_btn.click(lambda x: x, + inputs=inp, + outputs=out, + scroll_to_output=True) + no_scroll_btn.click(lambda x: x, + inputs=inp, + outputs=out) + +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/requirements.txt b/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..39dab0fdd98d55da5ce06ddf1dacbdbda14b1372 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/requirements.txt @@ -0,0 +1,2 @@ +torch +transformers \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/run.ipynb b/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..3a656fa92522e273e23c0eb201e381ce35b085d5 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_speech_text_sentiment"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio torch transformers"]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["from transformers import pipeline\n", "\n", "import gradio as gr\n", "\n", "asr = pipeline(\"automatic-speech-recognition\", \"facebook/wav2vec2-base-960h\")\n", "classifier = pipeline(\"text-classification\")\n", "\n", "\n", "def speech_to_text(speech):\n", " text = asr(speech)[\"text\"]\n", " return text\n", "\n", "\n", "def text_to_sentiment(text):\n", " return classifier(text)[0][\"label\"]\n", "\n", "\n", "demo = gr.Blocks()\n", "\n", "with demo:\n", " audio_file = gr.Audio(type=\"filepath\")\n", " text = gr.Textbox()\n", " label = gr.Label()\n", "\n", " b1 = gr.Button(\"Recognize Speech\")\n", " b2 = gr.Button(\"Classify Sentiment\")\n", "\n", " b1.click(speech_to_text, inputs=audio_file, outputs=text)\n", " b2.click(text_to_sentiment, inputs=text, outputs=label)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/run.py b/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/run.py new file mode 100644 index 0000000000000000000000000000000000000000..2c9343fd1233859ec226129c890fc43939f352a1 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_speech_text_sentiment/run.py @@ -0,0 +1,32 @@ +from transformers import pipeline + +import gradio as gr + +asr = pipeline("automatic-speech-recognition", "facebook/wav2vec2-base-960h") +classifier = pipeline("text-classification") + + +def speech_to_text(speech): + text = asr(speech)["text"] + return text + + +def text_to_sentiment(text): + return classifier(text)[0]["label"] + + +demo = gr.Blocks() + +with demo: + audio_file = gr.Audio(type="filepath") + text = gr.Textbox() + label = gr.Label() + + b1 = gr.Button("Recognize Speech") + b2 = gr.Button("Classify Sentiment") + + b1.click(speech_to_text, inputs=audio_file, outputs=text) + b2.click(text_to_sentiment, inputs=text, outputs=label) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/blocks_webcam/run.ipynb b/groundingLMM/gradio-dev/demo/blocks_webcam/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..91a8c5f8ee53ce1b87b22e32942dd8b639031008 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_webcam/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: blocks_webcam"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import numpy as np\n", "\n", "import gradio as gr\n", "\n", "\n", "def snap(image):\n", " return np.flipud(image)\n", "\n", "\n", "demo = gr.Interface(snap, \"webcam\", \"image\")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/blocks_webcam/run.py b/groundingLMM/gradio-dev/demo/blocks_webcam/run.py new file mode 100644 index 0000000000000000000000000000000000000000..4b9259868408d77c816b082b60e5d838a443a60e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/blocks_webcam/run.py @@ -0,0 +1,13 @@ +import numpy as np + +import gradio as gr + + +def snap(image): + return np.flipud(image) + + +demo = gr.Interface(snap, "webcam", "image") + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/button_component/run.ipynb b/groundingLMM/gradio-dev/demo/button_component/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..327c074a2179fdc7cf579fa647c159f8af7f9e3e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/button_component/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: button_component"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "css = \"footer {display: none !important;} .gradio-container {min-height: 0px !important;}\"\n", "\n", "with gr.Blocks(css=css) as demo:\n", " gr.Button()\n", " \n", "demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/button_component/run.py b/groundingLMM/gradio-dev/demo/button_component/run.py new file mode 100644 index 0000000000000000000000000000000000000000..e27778fedf3d96041244269a5d88f5b9fcfe0b24 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/button_component/run.py @@ -0,0 +1,8 @@ +import gradio as gr + +css = "footer {display: none !important;} .gradio-container {min-height: 0px !important;}" + +with gr.Blocks(css=css) as demo: + gr.Button() + +demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/calculator/screenshot.gif b/groundingLMM/gradio-dev/demo/calculator/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..8ae0d0494adf069b4e23cf30956b43262258021c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/calculator/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3698fb03b6507ff954de47559f6830dfff88aa66487d2029a9bcf1c2f3762e08 +size 5718090 diff --git a/groundingLMM/gradio-dev/demo/calculator_live/screenshot.gif b/groundingLMM/gradio-dev/demo/calculator_live/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..d1da057e4aaa02fca4e2a05160c5afd2b43bbaa8 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/calculator_live/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa2424ecfa662e71fdb73f35809fb06f2ce9cbf0be7ffea3a72c05f0513063e4 +size 776302 diff --git a/groundingLMM/gradio-dev/demo/chatbot_multimodal/run.ipynb b/groundingLMM/gradio-dev/demo/chatbot_multimodal/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..8130dab1c330a13a0ac8471bab94e301704ba3cd --- /dev/null +++ b/groundingLMM/gradio-dev/demo/chatbot_multimodal/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: chatbot_multimodal"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "\n", "def add_text(history, text):\n", " history = history + [(text, None)]\n", " return history, gr.update(value=\"\", interactive=False)\n", "\n", "\n", "def add_file(history, file):\n", " history = history + [((file.name,), None)]\n", " return history\n", "\n", "\n", "def bot(history):\n", " response = \"**That's cool!**\"\n", " history[-1][1] = response\n", " return history\n", "\n", "\n", "with gr.Blocks() as demo:\n", " chatbot = gr.Chatbot([], elem_id=\"chatbot\").style(height=750)\n", "\n", " with gr.Row():\n", " with gr.Column(scale=0.85):\n", " txt = gr.Textbox(\n", " show_label=False,\n", " placeholder=\"Enter text and press enter, or upload an image\",\n", " ).style(container=False)\n", " with gr.Column(scale=0.15, min_width=0):\n", " btn = gr.UploadButton(\"\ud83d\udcc1\", file_types=[\"image\", \"video\", \"audio\"])\n", "\n", " txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then(\n", " bot, chatbot, chatbot\n", " )\n", " txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False)\n", " file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then(\n", " bot, chatbot, chatbot\n", " )\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/chatbot_multimodal/run.py b/groundingLMM/gradio-dev/demo/chatbot_multimodal/run.py new file mode 100644 index 0000000000000000000000000000000000000000..824c7c0fc761f35ba21150a8cf676c011435bf0e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/chatbot_multimodal/run.py @@ -0,0 +1,41 @@ +import gradio as gr + + +def add_text(history, text): + history = history + [(text, None)] + return history, gr.update(value="", interactive=False) + + +def add_file(history, file): + history = history + [((file.name,), None)] + return history + + +def bot(history): + response = "**That's cool!**" + history[-1][1] = response + return history + + +with gr.Blocks() as demo: + chatbot = gr.Chatbot([], elem_id="chatbot").style(height=750) + + with gr.Row(): + with gr.Column(scale=0.85): + txt = gr.Textbox( + show_label=False, + placeholder="Enter text and press enter, or upload an image", + ).style(container=False) + with gr.Column(scale=0.15, min_width=0): + btn = gr.UploadButton("📁", file_types=["image", "video", "audio"]) + + txt_msg = txt.submit(add_text, [chatbot, txt], [chatbot, txt], queue=False).then( + bot, chatbot, chatbot + ) + txt_msg.then(lambda: gr.update(interactive=True), None, [txt], queue=False) + file_msg = btn.upload(add_file, [chatbot, btn], [chatbot], queue=False).then( + bot, chatbot, chatbot + ) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/chatbot_streaming/run.ipynb b/groundingLMM/gradio-dev/demo/chatbot_streaming/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..292a8177e84d1802d2255ed9963dc4a89ad455d9 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/chatbot_streaming/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: chatbot_streaming"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import random\n", "import time\n", "\n", "with gr.Blocks() as demo:\n", " chatbot = gr.Chatbot()\n", " msg = gr.Textbox()\n", " clear = gr.ClearButton([msg, chatbot])\n", "\n", " def user(user_message, history):\n", " return gr.update(value=\"\", interactive=False), history + [[user_message, None]]\n", "\n", " def bot(history):\n", " bot_message = random.choice([\"How are you?\", \"I love you\", \"I'm very hungry\"])\n", " history[-1][1] = \"\"\n", " for character in bot_message:\n", " history[-1][1] += character\n", " time.sleep(0.05)\n", " yield history\n", "\n", " response = msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(\n", " bot, chatbot, chatbot\n", " )\n", " response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)\n", "\n", "demo.queue()\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/chatbot_streaming/run.py b/groundingLMM/gradio-dev/demo/chatbot_streaming/run.py new file mode 100644 index 0000000000000000000000000000000000000000..ab6b1350217302eeea09a620ad83410b8d8fcbc5 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/chatbot_streaming/run.py @@ -0,0 +1,28 @@ +import gradio as gr +import random +import time + +with gr.Blocks() as demo: + chatbot = gr.Chatbot() + msg = gr.Textbox() + clear = gr.ClearButton([msg, chatbot]) + + def user(user_message, history): + return gr.update(value="", interactive=False), history + [[user_message, None]] + + def bot(history): + bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"]) + history[-1][1] = "" + for character in bot_message: + history[-1][1] += character + time.sleep(0.05) + yield history + + response = msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then( + bot, chatbot, chatbot + ) + response.then(lambda: gr.update(interactive=True), None, [msg], queue=False) + +demo.queue() +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/color_picker/screenshot.gif b/groundingLMM/gradio-dev/demo/color_picker/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..3283240a8687e79e7d2c70e4a36c494a4a97adc3 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/color_picker/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:339847aef03df1b31807d72c4e697a94932d8c02588c22473ceefea81d494a5e +size 411225 diff --git a/groundingLMM/gradio-dev/demo/dataframe_block-ui-test/run.ipynb b/groundingLMM/gradio-dev/demo/dataframe_block-ui-test/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..9c7dced1a1644bceda3ac631401c45bfd8334d69 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/dataframe_block-ui-test/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: dataframe_block-ui-test"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "with gr.Blocks() as demo:\n", " count = gr.Slider(minimum=1, maximum=10, step=1, label=\"count\")\n", " data = gr.DataFrame(\n", " headers=[\"A\", \"B\"], col_count=(2, \"fixed\"), type=\"array\", interactive=True\n", " )\n", " btn = gr.Button(value=\"click\")\n", " btn.click(\n", " fn=lambda cnt: [[str(2 * i), str(2 * i + 1)] for i in range(int(cnt))],\n", " inputs=[count],\n", " outputs=[data],\n", " )\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/dataframe_block-ui-test/run.py b/groundingLMM/gradio-dev/demo/dataframe_block-ui-test/run.py new file mode 100644 index 0000000000000000000000000000000000000000..20f804b0a11479673495b32c400fcb299dcdb78c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/dataframe_block-ui-test/run.py @@ -0,0 +1,15 @@ +import gradio as gr + +with gr.Blocks() as demo: + count = gr.Slider(minimum=1, maximum=10, step=1, label="count") + data = gr.DataFrame( + headers=["A", "B"], col_count=(2, "fixed"), type="array", interactive=True + ) + btn = gr.Button(value="click") + btn.click( + fn=lambda cnt: [[str(2 * i), str(2 * i + 1)] for i in range(int(cnt))], + inputs=[count], + outputs=[data], + ) + +demo.launch() diff --git a/groundingLMM/gradio-dev/demo/digit_classifier/requirements.txt b/groundingLMM/gradio-dev/demo/digit_classifier/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..b3a60b6da25b54d3e1a3696814eed57ef4ef62b7 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/digit_classifier/requirements.txt @@ -0,0 +1 @@ +tensorflow \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/digit_classifier/run.ipynb b/groundingLMM/gradio-dev/demo/digit_classifier/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..a2610e73cb4c5525b97204da76a913db771cc610 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/digit_classifier/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: digit_classifier"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio tensorflow"]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["from urllib.request import urlretrieve\n", "\n", "import tensorflow as tf\n", "\n", "import gradio as gr\n", "\n", "urlretrieve(\n", " \"https://gr-models.s3-us-west-2.amazonaws.com/mnist-model.h5\", \"mnist-model.h5\"\n", ")\n", "model = tf.keras.models.load_model(\"mnist-model.h5\")\n", "\n", "\n", "def recognize_digit(image):\n", " image = image.reshape(1, -1)\n", " prediction = model.predict(image).tolist()[0]\n", " return {str(i): prediction[i] for i in range(10)}\n", "\n", "\n", "im = gr.Image(shape=(28, 28), image_mode=\"L\", invert_colors=False, source=\"canvas\")\n", "\n", "demo = gr.Interface(\n", " recognize_digit,\n", " im,\n", " gr.Label(num_top_classes=3),\n", " live=True,\n", " interpretation=\"default\",\n", " capture_session=True,\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/digit_classifier/run.py b/groundingLMM/gradio-dev/demo/digit_classifier/run.py new file mode 100644 index 0000000000000000000000000000000000000000..7d38d5bb1e676cf6d12a49105b5a0b9988529b62 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/digit_classifier/run.py @@ -0,0 +1,31 @@ +from urllib.request import urlretrieve + +import tensorflow as tf + +import gradio as gr + +urlretrieve( + "https://gr-models.s3-us-west-2.amazonaws.com/mnist-model.h5", "mnist-model.h5" +) +model = tf.keras.models.load_model("mnist-model.h5") + + +def recognize_digit(image): + image = image.reshape(1, -1) + prediction = model.predict(image).tolist()[0] + return {str(i): prediction[i] for i in range(10)} + + +im = gr.Image(shape=(28, 28), image_mode="L", invert_colors=False, source="canvas") + +demo = gr.Interface( + recognize_digit, + im, + gr.Label(num_top_classes=3), + live=True, + interpretation="default", + capture_session=True, +) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/digit_classifier/screenshot.png b/groundingLMM/gradio-dev/demo/digit_classifier/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..6f80f61cb13e05f2a7996ec2127beef4289ece3b Binary files /dev/null and b/groundingLMM/gradio-dev/demo/digit_classifier/screenshot.png differ diff --git a/groundingLMM/gradio-dev/demo/gpt_j/run.ipynb b/groundingLMM/gradio-dev/demo/gpt_j/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..f96d85442027f5b1b65a4353466e2a1f6b959c1d --- /dev/null +++ b/groundingLMM/gradio-dev/demo/gpt_j/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: gpt_j"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "title = \"GPT-J-6B\"\n", "\n", "examples = [\n", " [\"The tower is 324 metres (1,063 ft) tall,\"],\n", " [\"The Moon's orbit around Earth has\"],\n", " [\"The smooth Borealis basin in the Northern Hemisphere covers 40%\"],\n", "]\n", "\n", "demo = gr.load(\n", " \"huggingface/EleutherAI/gpt-j-6B\",\n", " inputs=gr.Textbox(lines=5, max_lines=6, label=\"Input Text\"),\n", " title=title,\n", " examples=examples,\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/gpt_j/run.py b/groundingLMM/gradio-dev/demo/gpt_j/run.py new file mode 100644 index 0000000000000000000000000000000000000000..29c6fa5f4206a6257257e7bf099d6551f318ec8c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/gpt_j/run.py @@ -0,0 +1,19 @@ +import gradio as gr + +title = "GPT-J-6B" + +examples = [ + ["The tower is 324 metres (1,063 ft) tall,"], + ["The Moon's orbit around Earth has"], + ["The smooth Borealis basin in the Northern Hemisphere covers 40%"], +] + +demo = gr.load( + "huggingface/EleutherAI/gpt-j-6B", + inputs=gr.Textbox(lines=5, max_lines=6, label="Input Text"), + title=title, + examples=examples, +) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/hello_world/screenshot.gif b/groundingLMM/gradio-dev/demo/hello_world/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..8a7a275722a845c73159593638fce4e913f84fc6 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/hello_world/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78978f9fb71daf24685e7f2aba0060b2839613d22a4a06d0b95143316883deb6 +size 897877 diff --git a/groundingLMM/gradio-dev/demo/hello_world_2/screenshot.gif b/groundingLMM/gradio-dev/demo/hello_world_2/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..d99ef184d9cf1ab18e86d6356a900f031d5c83f6 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/hello_world_2/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97269daef7203ef7727cba3e0f5a90afa060219692ba535c06818fdc8f11fe06 +size 1121749 diff --git a/groundingLMM/gradio-dev/demo/hello_world_3/screenshot.gif b/groundingLMM/gradio-dev/demo/hello_world_3/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..41c2292e362619aaaac375820a04f11837c0eaec --- /dev/null +++ b/groundingLMM/gradio-dev/demo/hello_world_3/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0481bb668cc9269f7c680b971dd284f34b7aa822fa1ca530c520b1438e809bc8 +size 506714 diff --git a/groundingLMM/gradio-dev/demo/image_classifier/screenshot.gif b/groundingLMM/gradio-dev/demo/image_classifier/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..54612cf0f57059d7ab3e2a52c51b5f7b5680db96 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/image_classifier/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97cc57f521c8b2d482fffeb04da7b452da6d3abb0ced50ed544d22a2456a4a20 +size 421819 diff --git a/groundingLMM/gradio-dev/demo/image_classifier/screenshot.png b/groundingLMM/gradio-dev/demo/image_classifier/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..2ec6074bf79d2bc1012831184d83fe2d684ede23 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/image_classifier/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53b089dcb36451d6ff3c10592be52bf26109908f27905e83ab905767efc41659 +size 553635 diff --git a/groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.gif b/groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..54612cf0f57059d7ab3e2a52c51b5f7b5680db96 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97cc57f521c8b2d482fffeb04da7b452da6d3abb0ced50ed544d22a2456a4a20 +size 421819 diff --git a/groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.png b/groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..2ec6074bf79d2bc1012831184d83fe2d684ede23 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/image_classifier_interpretation/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53b089dcb36451d6ff3c10592be52bf26109908f27905e83ab905767efc41659 +size 553635 diff --git a/groundingLMM/gradio-dev/demo/image_mod/screenshot.png b/groundingLMM/gradio-dev/demo/image_mod/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..07939d98debb9d571a75ba02e2948cf75afeb65a --- /dev/null +++ b/groundingLMM/gradio-dev/demo/image_mod/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9e12c6742252fc970c3983e6691050d55034d40d1b553b93a94eb9b5c94c6e9 +size 1108299 diff --git a/groundingLMM/gradio-dev/demo/interface_series/run.ipynb b/groundingLMM/gradio-dev/demo/interface_series/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..638bb79eea22cc9dbb2bcf9c25af470b47e72880 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/interface_series/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: interface_series"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "get_name = gr.Interface(lambda name: name, inputs=\"textbox\", outputs=\"textbox\")\n", "prepend_hello = gr.Interface(lambda name: f\"Hello {name}!\", inputs=\"textbox\", outputs=\"textbox\")\n", "append_nice = gr.Interface(lambda greeting: f\"{greeting} Nice to meet you!\",\n", " inputs=\"textbox\", outputs=gr.Textbox(label=\"Greeting\"))\n", "demo = gr.Series(get_name, prepend_hello, append_nice)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/interface_series/run.py b/groundingLMM/gradio-dev/demo/interface_series/run.py new file mode 100644 index 0000000000000000000000000000000000000000..ac942ff94b23e605f75948797f796208e11e3a9a --- /dev/null +++ b/groundingLMM/gradio-dev/demo/interface_series/run.py @@ -0,0 +1,10 @@ +import gradio as gr + +get_name = gr.Interface(lambda name: name, inputs="textbox", outputs="textbox") +prepend_hello = gr.Interface(lambda name: f"Hello {name}!", inputs="textbox", outputs="textbox") +append_nice = gr.Interface(lambda greeting: f"{greeting} Nice to meet you!", + inputs="textbox", outputs=gr.Textbox(label="Greeting")) +demo = gr.Series(get_name, prepend_hello, append_nice) + +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/interpretation_component/requirements.txt b/groundingLMM/gradio-dev/demo/interpretation_component/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..bb3a20d8cf4aba8894a3046ad20f106d7541b711 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/interpretation_component/requirements.txt @@ -0,0 +1,3 @@ +shap +transformers +torch \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/interpretation_component/run.ipynb b/groundingLMM/gradio-dev/demo/interpretation_component/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..ea08d4d0973162a68b8700ea8c8553926ea74496 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/interpretation_component/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: interpretation_component"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio shap transformers torch"]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import shap\n", "from transformers import pipeline\n", "\n", "\n", "sentiment_classifier = pipeline(\"text-classification\", return_all_scores=True)\n", "\n", "def interpretation_function(text):\n", " explainer = shap.Explainer(sentiment_classifier)\n", " shap_values = explainer([text])\n", " scores = list(zip(shap_values.data[0], shap_values.values[0, :, 1]))\n", " return {\"original\": text, \"interpretation\": scores}\n", "\n", "css = \"footer {display: none !important;} .gradio-container {min-height: 0px !important;}\"\n", "\n", "with gr.Blocks(css=css) as demo:\n", " with gr.Row():\n", " with gr.Column():\n", " input_text = gr.Textbox(label=\"Sentiment Analysis\", value=\"Wonderfully terrible\")\n", " with gr.Row():\n", " interpret = gr.Button(\"Interpret\")\n", " with gr.Column():\n", " interpretation = gr.components.Interpretation(input_text)\n", "\n", " interpret.click(interpretation_function, input_text, interpretation)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/interpretation_component/run.py b/groundingLMM/gradio-dev/demo/interpretation_component/run.py new file mode 100644 index 0000000000000000000000000000000000000000..a8f3f84ceb0d79dcdbdb45a3ecacb1a02428dca8 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/interpretation_component/run.py @@ -0,0 +1,28 @@ +import gradio as gr +import shap +from transformers import pipeline + + +sentiment_classifier = pipeline("text-classification", return_all_scores=True) + +def interpretation_function(text): + explainer = shap.Explainer(sentiment_classifier) + shap_values = explainer([text]) + scores = list(zip(shap_values.data[0], shap_values.values[0, :, 1])) + return {"original": text, "interpretation": scores} + +css = "footer {display: none !important;} .gradio-container {min-height: 0px !important;}" + +with gr.Blocks(css=css) as demo: + with gr.Row(): + with gr.Column(): + input_text = gr.Textbox(label="Sentiment Analysis", value="Wonderfully terrible") + with gr.Row(): + interpret = gr.Button("Interpret") + with gr.Column(): + interpretation = gr.components.Interpretation(input_text) + + interpret.click(interpretation_function, input_text, interpretation) + +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/leaderboard/DESCRIPTION.md b/groundingLMM/gradio-dev/demo/leaderboard/DESCRIPTION.md new file mode 100644 index 0000000000000000000000000000000000000000..39267b584fec09a88b94170039959ec3ea2f3f58 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/leaderboard/DESCRIPTION.md @@ -0,0 +1 @@ +A simple dashboard ranking spaces by number of likes. \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/leaderboard/run.ipynb b/groundingLMM/gradio-dev/demo/leaderboard/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..b368932998ecf19964e350674cdad31c8849ff1b --- /dev/null +++ b/groundingLMM/gradio-dev/demo/leaderboard/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: leaderboard\n", "### A simple dashboard ranking spaces by number of likes.\n", " "]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import requests\n", "import pandas as pd\n", "from huggingface_hub.hf_api import SpaceInfo\n", "path = f\"https://huggingface.co/api/spaces\"\n", "\n", "\n", "def get_blocks_party_spaces():\n", " r = requests.get(path)\n", " d = r.json()\n", " spaces = [SpaceInfo(**x) for x in d]\n", " blocks_spaces = {}\n", " for i in range(0,len(spaces)):\n", " if spaces[i].id.split('/')[0] == 'Gradio-Blocks' and hasattr(spaces[i], 'likes') and spaces[i].id != 'Gradio-Blocks/Leaderboard' and spaces[i].id != 'Gradio-Blocks/README':\n", " blocks_spaces[spaces[i].id]=spaces[i].likes\n", " df = pd.DataFrame(\n", " [{\"Spaces_Name\": Spaces, \"likes\": likes} for Spaces,likes in blocks_spaces.items()])\n", " df = df.sort_values(by=['likes'],ascending=False)\n", " return df\n", "\n", "block = gr.Blocks()\n", "\n", "with block: \n", " gr.Markdown(\"\"\"Leaderboard for the most popular Blocks Event Spaces. To learn more and join, see Blocks Party Event\"\"\")\n", " with gr.Tabs():\n", " with gr.TabItem(\"Blocks Party Leaderboard\"):\n", " with gr.Row():\n", " data = gr.outputs.Dataframe(type=\"pandas\")\n", " with gr.Row():\n", " data_run = gr.Button(\"Refresh\")\n", " data_run.click(get_blocks_party_spaces, inputs=None, outputs=data)\n", " # running the function on page load in addition to when the button is clicked\n", " block.load(get_blocks_party_spaces, inputs=None, outputs=data) \n", "\n", "block.launch()\n", "\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/leaderboard/run.py b/groundingLMM/gradio-dev/demo/leaderboard/run.py new file mode 100644 index 0000000000000000000000000000000000000000..48e26218c99fd45df1524e6869c3381d8a14773c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/leaderboard/run.py @@ -0,0 +1,36 @@ +import gradio as gr +import requests +import pandas as pd +from huggingface_hub.hf_api import SpaceInfo +path = f"https://huggingface.co/api/spaces" + + +def get_blocks_party_spaces(): + r = requests.get(path) + d = r.json() + spaces = [SpaceInfo(**x) for x in d] + blocks_spaces = {} + for i in range(0,len(spaces)): + if spaces[i].id.split('/')[0] == 'Gradio-Blocks' and hasattr(spaces[i], 'likes') and spaces[i].id != 'Gradio-Blocks/Leaderboard' and spaces[i].id != 'Gradio-Blocks/README': + blocks_spaces[spaces[i].id]=spaces[i].likes + df = pd.DataFrame( + [{"Spaces_Name": Spaces, "likes": likes} for Spaces,likes in blocks_spaces.items()]) + df = df.sort_values(by=['likes'],ascending=False) + return df + +block = gr.Blocks() + +with block: + gr.Markdown("""Leaderboard for the most popular Blocks Event Spaces. To learn more and join, see Blocks Party Event""") + with gr.Tabs(): + with gr.TabItem("Blocks Party Leaderboard"): + with gr.Row(): + data = gr.outputs.Dataframe(type="pandas") + with gr.Row(): + data_run = gr.Button("Refresh") + data_run.click(get_blocks_party_spaces, inputs=None, outputs=data) + # running the function on page load in addition to when the button is clicked + block.load(get_blocks_party_spaces, inputs=None, outputs=data) + +block.launch() + diff --git a/groundingLMM/gradio-dev/demo/markdown_component/run.ipynb b/groundingLMM/gradio-dev/demo/markdown_component/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..75af2db5ebd762bbad950b0bbcecc538a8998f20 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/markdown_component/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: markdown_component"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "css = (\n", " \"footer {display: none !important;} .gradio-container {min-height: 0px !important;}\"\n", ")\n", "\n", "with gr.Blocks(css=css) as demo:\n", " gr.Markdown(value=\"This _example_ was **written** in [Markdown](https://en.wikipedia.org/wiki/Markdown)\\n\")\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/markdown_component/run.py b/groundingLMM/gradio-dev/demo/markdown_component/run.py new file mode 100644 index 0000000000000000000000000000000000000000..02fef0699f948258d5e5445bee4a63df75ac394a --- /dev/null +++ b/groundingLMM/gradio-dev/demo/markdown_component/run.py @@ -0,0 +1,10 @@ +import gradio as gr + +css = ( + "footer {display: none !important;} .gradio-container {min-height: 0px !important;}" +) + +with gr.Blocks(css=css) as demo: + gr.Markdown(value="This _example_ was **written** in [Markdown](https://en.wikipedia.org/wiki/Markdown)\n") + +demo.launch() diff --git a/groundingLMM/gradio-dev/demo/model3D_demo.zip b/groundingLMM/gradio-dev/demo/model3D_demo.zip new file mode 100644 index 0000000000000000000000000000000000000000..12309e3ae972e56e7fb0d37c73f2912d4f6ef495 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/model3D_demo.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49112eed80b58d99b205ac76b7e2cb2e55ef1195fad4dd4ccacfebe2320e2d3d +size 287848 diff --git a/groundingLMM/gradio-dev/demo/pictionary/class_names.txt b/groundingLMM/gradio-dev/demo/pictionary/class_names.txt new file mode 100644 index 0000000000000000000000000000000000000000..52a6caf89fcdb903620bccd0ad0f50b6d9ed6de4 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/pictionary/class_names.txt @@ -0,0 +1,100 @@ +airplane +alarm_clock +anvil +apple +axe +baseball +baseball_bat +basketball +beard +bed +bench +bicycle +bird +book +bread +bridge +broom +butterfly +camera +candle +car +cat +ceiling_fan +cell_phone +chair +circle +clock +cloud +coffee_cup +cookie +cup +diving_board +donut +door +drums +dumbbell +envelope +eye +eyeglasses +face +fan +flower +frying_pan +grapes +hammer +hat +headphones +helmet +hot_dog +ice_cream +key +knife +ladder +laptop +light_bulb +lightning +line +lollipop +microphone +moon +mountain +moustache +mushroom +pants +paper_clip +pencil +pillow +pizza +power_outlet +radio +rainbow +rifle +saw +scissors +screwdriver +shorts +shovel +smiley_face +snake +sock +spider +spoon +square +star +stop_sign +suitcase +sun +sword +syringe +t-shirt +table +tennis_racquet +tent +tooth +traffic_light +tree +triangle +umbrella +wheel +wristwatch diff --git a/groundingLMM/gradio-dev/demo/pictionary/requirements.txt b/groundingLMM/gradio-dev/demo/pictionary/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ed9a63afad7f8e3282493f6e2c2cadb74280f99c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/pictionary/requirements.txt @@ -0,0 +1,3 @@ +torch +gdown +numpy \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/pictionary/run.ipynb b/groundingLMM/gradio-dev/demo/pictionary/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..a3200f294fba795499516eda3a6c087dcce0db05 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/pictionary/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: pictionary"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio torch gdown numpy"]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/pictionary/class_names.txt"]}, {"cell_type": "code", "execution_count": null, "id": 44380577570523278879349135829904343037, "metadata": {}, "outputs": [], "source": ["from pathlib import Path\n", "\n", "import numpy as np\n", "import torch\n", "import gradio as gr\n", "from torch import nn\n", "import gdown \n", "\n", "url = 'https://drive.google.com/uc?id=1dsk2JNZLRDjC-0J4wIQX_FcVurPaXaAZ'\n", "output = 'pytorch_model.bin'\n", "gdown.download(url, output, quiet=False)\n", "\n", "LABELS = Path('class_names.txt').read_text().splitlines()\n", "\n", "model = nn.Sequential(\n", " nn.Conv2d(1, 32, 3, padding='same'),\n", " nn.ReLU(),\n", " nn.MaxPool2d(2),\n", " nn.Conv2d(32, 64, 3, padding='same'),\n", " nn.ReLU(),\n", " nn.MaxPool2d(2),\n", " nn.Conv2d(64, 128, 3, padding='same'),\n", " nn.ReLU(),\n", " nn.MaxPool2d(2),\n", " nn.Flatten(),\n", " nn.Linear(1152, 256),\n", " nn.ReLU(),\n", " nn.Linear(256, len(LABELS)),\n", ")\n", "state_dict = torch.load('pytorch_model.bin', map_location='cpu')\n", "model.load_state_dict(state_dict, strict=False)\n", "model.eval()\n", "\n", "def predict(im):\n", " if im is None:\n", " return None\n", " im = np.asarray(im.resize((28, 28)))\n", " \n", " x = torch.tensor(im, dtype=torch.float32).unsqueeze(0).unsqueeze(0) / 255.\n", "\n", " with torch.no_grad():\n", " out = model(x)\n", "\n", " probabilities = torch.nn.functional.softmax(out[0], dim=0)\n", "\n", " values, indices = torch.topk(probabilities, 5)\n", "\n", " return {LABELS[i]: v.item() for i, v in zip(indices, values)}\n", "\n", "\n", "interface = gr.Interface(predict, \n", " inputs=gr.Sketchpad(label=\"Draw Here\", brush_radius=5, type=\"pil\", shape=(120, 120)), \n", " outputs=gr.Label(label=\"Guess\"), \n", " live=True)\n", "\n", "interface.queue().launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/pictionary/run.py b/groundingLMM/gradio-dev/demo/pictionary/run.py new file mode 100644 index 0000000000000000000000000000000000000000..ce9be4d1f3fa9f72a6cf516ab24484c8960d5e74 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/pictionary/run.py @@ -0,0 +1,56 @@ +from pathlib import Path + +import numpy as np +import torch +import gradio as gr +from torch import nn +import gdown + +url = 'https://drive.google.com/uc?id=1dsk2JNZLRDjC-0J4wIQX_FcVurPaXaAZ' +output = 'pytorch_model.bin' +gdown.download(url, output, quiet=False) + +LABELS = Path('class_names.txt').read_text().splitlines() + +model = nn.Sequential( + nn.Conv2d(1, 32, 3, padding='same'), + nn.ReLU(), + nn.MaxPool2d(2), + nn.Conv2d(32, 64, 3, padding='same'), + nn.ReLU(), + nn.MaxPool2d(2), + nn.Conv2d(64, 128, 3, padding='same'), + nn.ReLU(), + nn.MaxPool2d(2), + nn.Flatten(), + nn.Linear(1152, 256), + nn.ReLU(), + nn.Linear(256, len(LABELS)), +) +state_dict = torch.load('pytorch_model.bin', map_location='cpu') +model.load_state_dict(state_dict, strict=False) +model.eval() + +def predict(im): + if im is None: + return None + im = np.asarray(im.resize((28, 28))) + + x = torch.tensor(im, dtype=torch.float32).unsqueeze(0).unsqueeze(0) / 255. + + with torch.no_grad(): + out = model(x) + + probabilities = torch.nn.functional.softmax(out[0], dim=0) + + values, indices = torch.topk(probabilities, 5) + + return {LABELS[i]: v.item() for i, v in zip(indices, values)} + + +interface = gr.Interface(predict, + inputs=gr.Sketchpad(label="Draw Here", brush_radius=5, type="pil", shape=(120, 120)), + outputs=gr.Label(label="Guess"), + live=True) + +interface.queue().launch() diff --git a/groundingLMM/gradio-dev/demo/request_ip_headers/run.ipynb b/groundingLMM/gradio-dev/demo/request_ip_headers/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..5f39209171af177146fe362b843d0668b5905c89 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/request_ip_headers/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: request_ip_headers"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "\n", "def predict(text, request: gr.Request):\n", " headers = request.headers\n", " host = request.client.host\n", " user_agent = request.headers[\"user-agent\"]\n", " return {\n", " \"ip\": host,\n", " \"user_agent\": user_agent,\n", " \"headers\": headers,\n", " }\n", "\n", "\n", "gr.Interface(predict, \"text\", \"json\").queue().launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/request_ip_headers/run.py b/groundingLMM/gradio-dev/demo/request_ip_headers/run.py new file mode 100644 index 0000000000000000000000000000000000000000..fbd9fff25ccd1fdb22f63353c3dd578a563c6337 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/request_ip_headers/run.py @@ -0,0 +1,15 @@ +import gradio as gr + + +def predict(text, request: gr.Request): + headers = request.headers + host = request.client.host + user_agent = request.headers["user-agent"] + return { + "ip": host, + "user_agent": user_agent, + "headers": headers, + } + + +gr.Interface(predict, "text", "json").queue().launch() diff --git a/groundingLMM/gradio-dev/demo/sales_projections/screenshot.gif b/groundingLMM/gradio-dev/demo/sales_projections/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..2460d235a20e02d6a46e00903f330c80ee873334 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/sales_projections/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf5c0ef79446b0cb270d556225ef8866084226bdf79c888f359183c2a19e7245 +size 5872200 diff --git a/groundingLMM/gradio-dev/demo/score_tracker/run.ipynb b/groundingLMM/gradio-dev/demo/score_tracker/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..c089e64c461d9ca597d121f09a5e8383a7266fd4 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/score_tracker/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: score_tracker"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "scores = []\n", "\n", "def track_score(score):\n", " scores.append(score)\n", " top_scores = sorted(scores, reverse=True)[:3]\n", " return top_scores\n", "\n", "demo = gr.Interface(\n", " track_score, \n", " gr.Number(label=\"Score\"), \n", " gr.JSON(label=\"Top Scores\")\n", ")\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/score_tracker/run.py b/groundingLMM/gradio-dev/demo/score_tracker/run.py new file mode 100644 index 0000000000000000000000000000000000000000..b024faf61739119dbcad381e8456ba4cfb97d82d --- /dev/null +++ b/groundingLMM/gradio-dev/demo/score_tracker/run.py @@ -0,0 +1,16 @@ +import gradio as gr + +scores = [] + +def track_score(score): + scores.append(score) + top_scores = sorted(scores, reverse=True)[:3] + return top_scores + +demo = gr.Interface( + track_score, + gr.Number(label="Score"), + gr.JSON(label="Top Scores") +) +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/sepia_filter/screenshot.gif b/groundingLMM/gradio-dev/demo/sepia_filter/screenshot.gif new file mode 100644 index 0000000000000000000000000000000000000000..6169b786aa203bcfab5e8b0da023ff646716a084 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/sepia_filter/screenshot.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e7091eff30c08a023ba18c44181e743637afe20b9e2111ba0b657c1c2817648 +size 3726270 diff --git a/groundingLMM/gradio-dev/demo/sound_alert/beep.mp3 b/groundingLMM/gradio-dev/demo/sound_alert/beep.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..cd3a3ecded0158e5ececd0520a73cfe59915e2a3 Binary files /dev/null and b/groundingLMM/gradio-dev/demo/sound_alert/beep.mp3 differ diff --git a/groundingLMM/gradio-dev/demo/sound_alert/run.ipynb b/groundingLMM/gradio-dev/demo/sound_alert/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..15da4349700c45ae54baeb5773a9ca9f6e327836 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/sound_alert/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: sound_alert"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "!wget -q https://github.com/gradio-app/gradio/raw/main/demo/sound_alert/beep.mp3"]}, {"cell_type": "code", "execution_count": null, "id": 44380577570523278879349135829904343037, "metadata": {}, "outputs": [], "source": ["import time\n", "import gradio as gr\n", "\n", "\n", "js_function = \"() => {new Audio('file=beep.mp3').play();}\"\n", "\n", "def task(x):\n", " time.sleep(2)\n", " return \"Hello, \" + x \n", "\n", "with gr.Blocks() as demo:\n", " name = gr.Textbox(label=\"name\")\n", " greeting = gr.Textbox(label=\"greeting\")\n", " name.blur(task, name, greeting)\n", " greeting.change(None, [], [], _js=js_function) # Note that _js is a special argument whose usage may change in the future\n", " \n", "demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/sound_alert/run.py b/groundingLMM/gradio-dev/demo/sound_alert/run.py new file mode 100644 index 0000000000000000000000000000000000000000..ba56a0b668b13feb89fb309f6ae187b121c7644e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/sound_alert/run.py @@ -0,0 +1,17 @@ +import time +import gradio as gr + + +js_function = "() => {new Audio('file=beep.mp3').play();}" + +def task(x): + time.sleep(2) + return "Hello, " + x + +with gr.Blocks() as demo: + name = gr.Textbox(label="name") + greeting = gr.Textbox(label="greeting") + name.blur(task, name, greeting) + greeting.change(None, [], [], _js=js_function) # Note that _js is a special argument whose usage may change in the future + +demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/spectogram/screenshot.png b/groundingLMM/gradio-dev/demo/spectogram/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..ace2078e536eb4d2ce3e69bf80dde1a88867a9a9 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/spectogram/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76bce2db2b53227282774fff1bb429e9791a533d2ea83f458b5839fd3b374cd3 +size 309199 diff --git a/groundingLMM/gradio-dev/demo/stock_forecast/screenshot.png b/groundingLMM/gradio-dev/demo/stock_forecast/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..242a60b242bc89d6f71175bfd091553103c8a2ed --- /dev/null +++ b/groundingLMM/gradio-dev/demo/stock_forecast/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:229b2943fef0d16a69a5359709c48c480f9a699d426d20a1f7500c095b024e80 +size 116350 diff --git a/groundingLMM/gradio-dev/demo/streaming_stt/.gitignore b/groundingLMM/gradio-dev/demo/streaming_stt/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4a7244336b108f13599567a1d36d54c04f02c488 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_stt/.gitignore @@ -0,0 +1,2 @@ +*.pbmm +*.scorer \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/streaming_stt/requirements.txt b/groundingLMM/gradio-dev/demo/streaming_stt/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..404e2017f909f5552e880697eae0458ec6d912bf --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_stt/requirements.txt @@ -0,0 +1 @@ +deepspeech==0.9.3 \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/streaming_stt/run.ipynb b/groundingLMM/gradio-dev/demo/streaming_stt/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..4e08dbae897d614863f4f073746a98752c815499 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_stt/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: streaming_stt"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio deepspeech==0.9.3"]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["from deepspeech import Model\n", "import gradio as gr\n", "import numpy as np\n", "import urllib.request\n", "\n", "model_file_path = \"deepspeech-0.9.3-models.pbmm\"\n", "lm_file_path = \"deepspeech-0.9.3-models.scorer\"\n", "url = \"https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/\"\n", "\n", "urllib.request.urlretrieve(url + model_file_path, filename=model_file_path)\n", "urllib.request.urlretrieve(url + lm_file_path, filename=lm_file_path)\n", "\n", "beam_width = 100\n", "lm_alpha = 0.93\n", "lm_beta = 1.18\n", "\n", "model = Model(model_file_path)\n", "model.enableExternalScorer(lm_file_path)\n", "model.setScorerAlphaBeta(lm_alpha, lm_beta)\n", "model.setBeamWidth(beam_width)\n", "\n", "\n", "def reformat_freq(sr, y):\n", " if sr not in (\n", " 48000,\n", " 16000,\n", " ): # Deepspeech only supports 16k, (we convert 48k -> 16k)\n", " raise ValueError(\"Unsupported rate\", sr)\n", " if sr == 48000:\n", " y = (\n", " ((y / max(np.max(y), 1)) * 32767)\n", " .reshape((-1, 3))\n", " .mean(axis=1)\n", " .astype(\"int16\")\n", " )\n", " sr = 16000\n", " return sr, y\n", "\n", "\n", "def transcribe(speech, stream):\n", " _, y = reformat_freq(*speech)\n", " if stream is None:\n", " stream = model.createStream()\n", " stream.feedAudioContent(y)\n", " text = stream.intermediateDecode()\n", " return text, stream\n", "\n", "\n", "demo = gr.Interface(\n", " transcribe,\n", " [gr.Audio(source=\"microphone\", streaming=True), \"state\"],\n", " [\"text\", \"state\"],\n", " live=True,\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/streaming_stt/run.py b/groundingLMM/gradio-dev/demo/streaming_stt/run.py new file mode 100644 index 0000000000000000000000000000000000000000..ec68e6b1d69cbc5c4f9782df64141c5074dceca1 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_stt/run.py @@ -0,0 +1,57 @@ +from deepspeech import Model +import gradio as gr +import numpy as np +import urllib.request + +model_file_path = "deepspeech-0.9.3-models.pbmm" +lm_file_path = "deepspeech-0.9.3-models.scorer" +url = "https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/" + +urllib.request.urlretrieve(url + model_file_path, filename=model_file_path) +urllib.request.urlretrieve(url + lm_file_path, filename=lm_file_path) + +beam_width = 100 +lm_alpha = 0.93 +lm_beta = 1.18 + +model = Model(model_file_path) +model.enableExternalScorer(lm_file_path) +model.setScorerAlphaBeta(lm_alpha, lm_beta) +model.setBeamWidth(beam_width) + + +def reformat_freq(sr, y): + if sr not in ( + 48000, + 16000, + ): # Deepspeech only supports 16k, (we convert 48k -> 16k) + raise ValueError("Unsupported rate", sr) + if sr == 48000: + y = ( + ((y / max(np.max(y), 1)) * 32767) + .reshape((-1, 3)) + .mean(axis=1) + .astype("int16") + ) + sr = 16000 + return sr, y + + +def transcribe(speech, stream): + _, y = reformat_freq(*speech) + if stream is None: + stream = model.createStream() + stream.feedAudioContent(y) + text = stream.intermediateDecode() + return text, stream + + +demo = gr.Interface( + transcribe, + [gr.Audio(source="microphone", streaming=True), "state"], + ["text", "state"], + live=True, +) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/streaming_stt/setup.sh b/groundingLMM/gradio-dev/demo/streaming_stt/setup.sh new file mode 100644 index 0000000000000000000000000000000000000000..bf8358848e843de3d76bb38278ca1fa30c134506 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_stt/setup.sh @@ -0,0 +1,3 @@ +wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.2/deepspeech-0.8.2-models.pbmm +wget https://github.com/mozilla/DeepSpeech/releases/download/v0.8.2/deepspeech-0.8.2-models.scorer +apt install libasound2-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/streaming_wav2vec/requirements.txt b/groundingLMM/gradio-dev/demo/streaming_wav2vec/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..4f492ddc93de3952474c43b325c02b1b0fcdec9c --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_wav2vec/requirements.txt @@ -0,0 +1,2 @@ +torch +transformers diff --git a/groundingLMM/gradio-dev/demo/streaming_wav2vec/run.ipynb b/groundingLMM/gradio-dev/demo/streaming_wav2vec/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..b92040cb1dd9f71a50b35e6e4c08d76ec7818f3e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_wav2vec/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: streaming_wav2vec"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio torch transformers "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["from transformers import pipeline\n", "import gradio as gr\n", "import time\n", "\n", "p = pipeline(\"automatic-speech-recognition\")\n", "\n", "def transcribe(audio, state=\"\"):\n", " time.sleep(2)\n", " text = p(audio)[\"text\"]\n", " state += text + \" \"\n", " return state, state\n", "\n", "demo = gr.Interface(\n", " fn=transcribe, \n", " inputs=[\n", " gr.Audio(source=\"microphone\", type=\"filepath\", streaming=True), \n", " \"state\"\n", " ],\n", " outputs=[\n", " \"textbox\",\n", " \"state\"\n", " ],\n", " live=True\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/streaming_wav2vec/run.py b/groundingLMM/gradio-dev/demo/streaming_wav2vec/run.py new file mode 100644 index 0000000000000000000000000000000000000000..e280397abbf060d09e3c332c13d621fd87be0493 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/streaming_wav2vec/run.py @@ -0,0 +1,27 @@ +from transformers import pipeline +import gradio as gr +import time + +p = pipeline("automatic-speech-recognition") + +def transcribe(audio, state=""): + time.sleep(2) + text = p(audio)["text"] + state += text + " " + return state, state + +demo = gr.Interface( + fn=transcribe, + inputs=[ + gr.Audio(source="microphone", type="filepath", streaming=True), + "state" + ], + outputs=[ + "textbox", + "state" + ], + live=True +) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/theme_new_step_1/run.ipynb b/groundingLMM/gradio-dev/demo/theme_new_step_1/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..c2db9e0e44b0c4c055fb56f33dc2fa8a8935c0c2 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/theme_new_step_1/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: theme_new_step_1"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "from gradio.themes.base import Base\n", "import time\n", "\n", "class Seafoam(Base):\n", " pass\n", "\n", "seafoam = Seafoam()\n", "\n", "with gr.Blocks(theme=seafoam) as demo:\n", " textbox = gr.Textbox(label=\"Name\")\n", " slider = gr.Slider(label=\"Count\", minimum=0, maximum=100, step=1)\n", " with gr.Row():\n", " button = gr.Button(\"Submit\", variant=\"primary\")\n", " clear = gr.Button(\"Clear\")\n", " output = gr.Textbox(label=\"Output\")\n", "\n", " def repeat(name, count):\n", " time.sleep(3)\n", " return name * count\n", " \n", " button.click(repeat, [textbox, slider], output)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/theme_new_step_1/run.py b/groundingLMM/gradio-dev/demo/theme_new_step_1/run.py new file mode 100644 index 0000000000000000000000000000000000000000..a77a6e339aec8bdbb5490082309b71938a6ce2a5 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/theme_new_step_1/run.py @@ -0,0 +1,25 @@ +import gradio as gr +from gradio.themes.base import Base +import time + +class Seafoam(Base): + pass + +seafoam = Seafoam() + +with gr.Blocks(theme=seafoam) as demo: + textbox = gr.Textbox(label="Name") + slider = gr.Slider(label="Count", minimum=0, maximum=100, step=1) + with gr.Row(): + button = gr.Button("Submit", variant="primary") + clear = gr.Button("Clear") + output = gr.Textbox(label="Output") + + def repeat(name, count): + time.sleep(3) + return name * count + + button.click(repeat, [textbox, slider], output) + +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/theme_soft/run.ipynb b/groundingLMM/gradio-dev/demo/theme_soft/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..35b788bb8e98cf6822d28b9c96622a27f54a50b6 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/theme_soft/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: theme_soft"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import time\n", "\n", "with gr.Blocks(theme=gr.themes.Soft()) as demo:\n", " textbox = gr.Textbox(label=\"Name\")\n", " slider = gr.Slider(label=\"Count\", minimum=0, maximum=100, step=1)\n", " with gr.Row():\n", " button = gr.Button(\"Submit\", variant=\"primary\")\n", " clear = gr.Button(\"Clear\")\n", " output = gr.Textbox(label=\"Output\")\n", "\n", " def repeat(name, count):\n", " time.sleep(3)\n", " return name * count\n", " \n", " button.click(repeat, [textbox, slider], output)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/theme_soft/run.py b/groundingLMM/gradio-dev/demo/theme_soft/run.py new file mode 100644 index 0000000000000000000000000000000000000000..2ca9b9b6a664eee1a94c0059752ea2e7b284339e --- /dev/null +++ b/groundingLMM/gradio-dev/demo/theme_soft/run.py @@ -0,0 +1,19 @@ +import gradio as gr +import time + +with gr.Blocks(theme=gr.themes.Soft()) as demo: + textbox = gr.Textbox(label="Name") + slider = gr.Slider(label="Count", minimum=0, maximum=100, step=1) + with gr.Row(): + button = gr.Button("Submit", variant="primary") + clear = gr.Button("Clear") + output = gr.Textbox(label="Output") + + def repeat(name, count): + time.sleep(3) + return name * count + + button.click(repeat, [textbox, slider], output) + +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/tictactoe/run.ipynb b/groundingLMM/gradio-dev/demo/tictactoe/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..b49d781e315abcc27de17664b3496c8388a0b2eb --- /dev/null +++ b/groundingLMM/gradio-dev/demo/tictactoe/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: tictactoe"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "with gr.Blocks() as demo:\n", " turn = gr.Textbox(\"X\", interactive=False, label=\"Turn\")\n", " board = gr.Dataframe(value=[[\"\", \"\", \"\"]] * 3, interactive=False, type=\"array\")\n", "\n", " def place(board, turn, evt: gr.SelectData):\n", " if evt.value:\n", " return board, turn\n", " board[evt.index[0]][evt.index[1]] = turn\n", " turn = \"O\" if turn == \"X\" else \"X\"\n", " return board, turn\n", "\n", " board.select(place, [board, turn], [board, turn])\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/tictactoe/run.py b/groundingLMM/gradio-dev/demo/tictactoe/run.py new file mode 100644 index 0000000000000000000000000000000000000000..d95ca50661d0d3c82bda52b79de90504a1bf3ca0 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/tictactoe/run.py @@ -0,0 +1,17 @@ +import gradio as gr + +with gr.Blocks() as demo: + turn = gr.Textbox("X", interactive=False, label="Turn") + board = gr.Dataframe(value=[["", "", ""]] * 3, interactive=False, type="array") + + def place(board, turn, evt: gr.SelectData): + if evt.value: + return board, turn + board[evt.index[0]][evt.index[1]] = turn + turn = "O" if turn == "X" else "X" + return board, turn + + board.select(place, [board, turn], [board, turn]) + +if __name__ == "__main__": + demo.launch() \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/upload_button/DESCRIPTION.md b/groundingLMM/gradio-dev/demo/upload_button/DESCRIPTION.md new file mode 100644 index 0000000000000000000000000000000000000000..a070ed152cb42b3634309c1ab460d2ddc2be321a --- /dev/null +++ b/groundingLMM/gradio-dev/demo/upload_button/DESCRIPTION.md @@ -0,0 +1 @@ +A simple demo showcasing the upload button used with its `upload` event trigger. \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/upload_button/run.ipynb b/groundingLMM/gradio-dev/demo/upload_button/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..7acd21453f3daa261639487b9671874e05471bb3 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/upload_button/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: upload_button\n", "### A simple demo showcasing the upload button used with its `upload` event trigger.\n", " "]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "def upload_file(files):\n", " file_paths = [file.name for file in files]\n", " return file_paths\n", "\n", "with gr.Blocks() as demo:\n", " file_output = gr.File()\n", " upload_button = gr.UploadButton(\"Click to Upload a File\", file_types=[\"image\", \"video\"], file_count=\"multiple\")\n", " upload_button.upload(upload_file, upload_button, file_output)\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/upload_button/run.py b/groundingLMM/gradio-dev/demo/upload_button/run.py new file mode 100644 index 0000000000000000000000000000000000000000..6e40d2a64a64ee37b4caf36d8b98133cfb701f25 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/upload_button/run.py @@ -0,0 +1,12 @@ +import gradio as gr + +def upload_file(files): + file_paths = [file.name for file in files] + return file_paths + +with gr.Blocks() as demo: + file_output = gr.File() + upload_button = gr.UploadButton("Click to Upload a File", file_types=["image", "video"], file_count="multiple") + upload_button.upload(upload_file, upload_button, file_output) + +demo.launch() diff --git a/groundingLMM/gradio-dev/demo/video_identity/run.ipynb b/groundingLMM/gradio-dev/demo/video_identity/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..19b4d287be16fd957f526574743c8716ac0e69df --- /dev/null +++ b/groundingLMM/gradio-dev/demo/video_identity/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: video_identity"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "os.mkdir('video')\n", "!wget -q -O video/video_sample.mp4 https://github.com/gradio-app/gradio/raw/main/demo/video_identity/video/video_sample.mp4"]}, {"cell_type": "code", "execution_count": null, "id": 44380577570523278879349135829904343037, "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import os\n", "\n", "\n", "def video_identity(video):\n", " return video\n", "\n", "\n", "demo = gr.Interface(video_identity, \n", " gr.Video(), \n", " \"playable_video\", \n", " examples=[\n", " os.path.join(os.path.abspath(''), \n", " \"video/video_sample.mp4\")], \n", " cache_examples=True)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/video_identity/run.py b/groundingLMM/gradio-dev/demo/video_identity/run.py new file mode 100644 index 0000000000000000000000000000000000000000..152dab9b0e8389c69531bb109124160ab03156e1 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/video_identity/run.py @@ -0,0 +1,18 @@ +import gradio as gr +import os + + +def video_identity(video): + return video + + +demo = gr.Interface(video_identity, + gr.Video(), + "playable_video", + examples=[ + os.path.join(os.path.dirname(__file__), + "video/video_sample.mp4")], + cache_examples=True) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/video_identity/screenshot.png b/groundingLMM/gradio-dev/demo/video_identity/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..9999f8c57f5ab7fb81ff0b892a6fdf3ec6b12371 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/video_identity/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a431f9aacbd4427e007e8c08329743cee71f6cbb793734074c70d7389cab0480 +size 215602 diff --git a/groundingLMM/gradio-dev/demo/webcam/screenshot.png b/groundingLMM/gradio-dev/demo/webcam/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..5858bfa75d97125516b2856688e3b1f4ca8cca3d --- /dev/null +++ b/groundingLMM/gradio-dev/demo/webcam/screenshot.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17332adea6939c98a363a13c1445499051cfdcab903af7a32d06b414f7765507 +size 589678 diff --git a/groundingLMM/gradio-dev/demo/zip_files/.gitignore b/groundingLMM/gradio-dev/demo/zip_files/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8e9b8f2027a5cfe97c8c9c96709fc2453c0df220 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/zip_files/.gitignore @@ -0,0 +1 @@ +tmp.zip \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/zip_files/run.ipynb b/groundingLMM/gradio-dev/demo/zip_files/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..21810513c773e5457b2f3f36bd00551d393aa1c3 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/zip_files/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: zip_files"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["# Downloading files from the demo repo\n", "import os\n", "os.mkdir('files')\n", "!wget -q -O files/titanic.csv https://github.com/gradio-app/gradio/raw/main/demo/zip_files/files/titanic.csv"]}, {"cell_type": "code", "execution_count": null, "id": 44380577570523278879349135829904343037, "metadata": {}, "outputs": [], "source": ["import os\n", "from zipfile import ZipFile\n", "\n", "import gradio as gr\n", "\n", "\n", "def zip_files(files):\n", " with ZipFile(\"tmp.zip\", \"w\") as zipObj:\n", " for idx, file in enumerate(files):\n", " zipObj.write(file.name, file.name.split(\"/\")[-1])\n", " return \"tmp.zip\"\n", "\n", "demo = gr.Interface(\n", " zip_files,\n", " gr.File(file_count=\"multiple\", file_types=[\"text\", \".json\", \".csv\"]),\n", " \"file\",\n", " examples=[[[os.path.join(os.path.abspath(''),\"files/titanic.csv\"), \n", " os.path.join(os.path.abspath(''),\"files/titanic.csv\"), \n", " os.path.join(os.path.abspath(''),\"files/titanic.csv\")]]], \n", " cache_examples=True\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/zip_files/run.py b/groundingLMM/gradio-dev/demo/zip_files/run.py new file mode 100644 index 0000000000000000000000000000000000000000..1ae6436c67542f82a94ca7c6d9675974b2503710 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/zip_files/run.py @@ -0,0 +1,24 @@ +import os +from zipfile import ZipFile + +import gradio as gr + + +def zip_files(files): + with ZipFile("tmp.zip", "w") as zipObj: + for idx, file in enumerate(files): + zipObj.write(file.name, file.name.split("/")[-1]) + return "tmp.zip" + +demo = gr.Interface( + zip_files, + gr.File(file_count="multiple", file_types=["text", ".json", ".csv"]), + "file", + examples=[[[os.path.join(os.path.dirname(__file__),"files/titanic.csv"), + os.path.join(os.path.dirname(__file__),"files/titanic.csv"), + os.path.join(os.path.dirname(__file__),"files/titanic.csv")]]], + cache_examples=True +) + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/zip_files/screenshot.png b/groundingLMM/gradio-dev/demo/zip_files/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..64591ff8a23e8c77759f60f7caddc61fb84f3324 Binary files /dev/null and b/groundingLMM/gradio-dev/demo/zip_files/screenshot.png differ diff --git a/groundingLMM/gradio-dev/demo/zip_to_json/run.ipynb b/groundingLMM/gradio-dev/demo/zip_to_json/run.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..0928b97b52932d7f2e84741930c6ae7b409ac566 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/zip_to_json/run.ipynb @@ -0,0 +1 @@ +{"cells": [{"cell_type": "markdown", "id": 302934307671667531413257853548643485645, "metadata": {}, "source": ["# Gradio Demo: zip_to_json"]}, {"cell_type": "code", "execution_count": null, "id": 272996653310673477252411125948039410165, "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": 288918539441861185822528903084949547379, "metadata": {}, "outputs": [], "source": ["from zipfile import ZipFile\n", "\n", "import gradio as gr\n", "\n", "\n", "def zip_to_json(file_obj):\n", " files = []\n", " with ZipFile(file_obj.name) as zfile:\n", " for zinfo in zfile.infolist():\n", " files.append(\n", " {\n", " \"name\": zinfo.filename,\n", " \"file_size\": zinfo.file_size,\n", " \"compressed_size\": zinfo.compress_size,\n", " }\n", " )\n", " return files\n", "\n", "\n", "demo = gr.Interface(zip_to_json, \"file\", \"json\")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5} \ No newline at end of file diff --git a/groundingLMM/gradio-dev/demo/zip_to_json/run.py b/groundingLMM/gradio-dev/demo/zip_to_json/run.py new file mode 100644 index 0000000000000000000000000000000000000000..2500b409d12175e25cc4062696624e85f5f78124 --- /dev/null +++ b/groundingLMM/gradio-dev/demo/zip_to_json/run.py @@ -0,0 +1,23 @@ +from zipfile import ZipFile + +import gradio as gr + + +def zip_to_json(file_obj): + files = [] + with ZipFile(file_obj.name) as zfile: + for zinfo in zfile.infolist(): + files.append( + { + "name": zinfo.filename, + "file_size": zinfo.file_size, + "compressed_size": zinfo.compress_size, + } + ) + return files + + +demo = gr.Interface(zip_to_json, "file", "json") + +if __name__ == "__main__": + demo.launch() diff --git a/groundingLMM/gradio-dev/demo/zip_to_json/screenshot.png b/groundingLMM/gradio-dev/demo/zip_to_json/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..0620b7885c984d4af6220c785eab51d4ae66a474 Binary files /dev/null and b/groundingLMM/gradio-dev/demo/zip_to_json/screenshot.png differ diff --git a/groundingLMM/gradio-dev/guides/assets/annotated.png b/groundingLMM/gradio-dev/guides/assets/annotated.png new file mode 100644 index 0000000000000000000000000000000000000000..4d29a0b43888050697596c29b535156d8c3bf005 --- /dev/null +++ b/groundingLMM/gradio-dev/guides/assets/annotated.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:484b381ffd855d1f67dd61a6c2476f0a3d701649c80ff5ab0a852d8fac6efc75 +size 406246 diff --git a/groundingLMM/gradio-dev/guides/assets/flagging-callback-hf.png b/groundingLMM/gradio-dev/guides/assets/flagging-callback-hf.png new file mode 100644 index 0000000000000000000000000000000000000000..2c410c64e8c698e586588c5678ddda7f65de3351 --- /dev/null +++ b/groundingLMM/gradio-dev/guides/assets/flagging-callback-hf.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6004e4b6fb03c1330a109ac61034ad9e51265b7896ca7f6b0b3f204c4e14b9a3 +size 149364 diff --git a/groundingLMM/gradio-dev/guides/assets/hf_demo.mp4 b/groundingLMM/gradio-dev/guides/assets/hf_demo.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..205f6e432582c7415062faf49761cee6c5161a95 --- /dev/null +++ b/groundingLMM/gradio-dev/guides/assets/hf_demo.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6e44f0aec73501ed76fd11b2f981047e4f51d8df1b1e2699cb03b755bfb83b0 +size 4785472 diff --git a/groundingLMM/gradio-dev/js/app/public/static/img/Duck.glb b/groundingLMM/gradio-dev/js/app/public/static/img/Duck.glb new file mode 100644 index 0000000000000000000000000000000000000000..94bef4cde7680d26a04007f779f3eb866fd60d42 --- /dev/null +++ b/groundingLMM/gradio-dev/js/app/public/static/img/Duck.glb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65bf938f54d6073e619e76e007820bbf980cdc3dc0daec0d94830ffc4ae54ab5 +size 120484 diff --git a/groundingLMM/gradio-dev/js/workbench/src/assets/cantina.wav b/groundingLMM/gradio-dev/js/workbench/src/assets/cantina.wav new file mode 100644 index 0000000000000000000000000000000000000000..83651968c382d3c17ad48d84995c9b71753ba694 --- /dev/null +++ b/groundingLMM/gradio-dev/js/workbench/src/assets/cantina.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e5f73001b324e413bdcf658fca5485057c333f4198e51e7e86bb2e772cd0973 +size 132344 diff --git a/groundingLMM/gradio-dev/readme_files/header-image.jpg b/groundingLMM/gradio-dev/readme_files/header-image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e67081df9ff904968309bb8635f10699117edfaf --- /dev/null +++ b/groundingLMM/gradio-dev/readme_files/header-image.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f7fe773d79433de8b76faed464a6c8927cb0a38668292d10e3d7c0427fbca71 +size 117453 diff --git a/groundingLMM/gradio-dev/test/golden/image_mod/cheetah1.png b/groundingLMM/gradio-dev/test/golden/image_mod/cheetah1.png new file mode 100644 index 0000000000000000000000000000000000000000..364419dc168eb597288e81498789a512cf784c23 --- /dev/null +++ b/groundingLMM/gradio-dev/test/golden/image_mod/cheetah1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:274414b6573971307a50722dc2ee358a434d00272ef71218d49d26f13c18467f +size 242514 diff --git a/groundingLMM/gradio-dev/test/test_files/playable_but_bad_container.mkv b/groundingLMM/gradio-dev/test/test_files/playable_but_bad_container.mkv new file mode 100644 index 0000000000000000000000000000000000000000..f9d3a731a34628df452cb6cba8b5fc9629660877 --- /dev/null +++ b/groundingLMM/gradio-dev/test/test_files/playable_but_bad_container.mkv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddf644c1b5bc070da151d147eff6ba22861de8cf92b129004ba479fc883d6dfc +size 136651 diff --git a/groundingLMM/gradio-dev/test/test_files/video_sample.mp4 b/groundingLMM/gradio-dev/test/test_files/video_sample.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..b962d7f9787361bfd14cc58ff5c95f3a3db2eefe --- /dev/null +++ b/groundingLMM/gradio-dev/test/test_files/video_sample.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc7e05ed802c94d74e9005e3bc53d5abfd36ab4b63be1602f6cfe697b789c418 +size 261179 diff --git a/groundingLMM/gradio-dev/test/test_files/video_sample.ogg b/groundingLMM/gradio-dev/test/test_files/video_sample.ogg new file mode 100644 index 0000000000000000000000000000000000000000..f9d3a731a34628df452cb6cba8b5fc9629660877 --- /dev/null +++ b/groundingLMM/gradio-dev/test/test_files/video_sample.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddf644c1b5bc070da151d147eff6ba22861de8cf92b129004ba479fc883d6dfc +size 136651 diff --git a/groundingLMM/gradio-dev/test/test_files/video_sample.webm b/groundingLMM/gradio-dev/test/test_files/video_sample.webm new file mode 100644 index 0000000000000000000000000000000000000000..9bd6d45fe8c20fadffc92168790352003d61732f --- /dev/null +++ b/groundingLMM/gradio-dev/test/test_files/video_sample.webm @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ea59d35d0cbd877d0cdecc6cbd77641f4bf174672c8295f88cd7bebed51df7a +size 129073 diff --git a/groundingLMM/gradio-dev/website/homepage/src/assets/img/header-image.jpg b/groundingLMM/gradio-dev/website/homepage/src/assets/img/header-image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e67081df9ff904968309bb8635f10699117edfaf --- /dev/null +++ b/groundingLMM/gradio-dev/website/homepage/src/assets/img/header-image.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f7fe773d79433de8b76faed464a6c8927cb0a38668292d10e3d7c0427fbca71 +size 117453 diff --git a/groundingLMM/gradio-dev/website/homepage/src/assets/img/meta-image.png b/groundingLMM/gradio-dev/website/homepage/src/assets/img/meta-image.png new file mode 100644 index 0000000000000000000000000000000000000000..463322b87300b9495b6611632172c1a15f9709dd --- /dev/null +++ b/groundingLMM/gradio-dev/website/homepage/src/assets/img/meta-image.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e7cb1ed6a9934c28e51c634c2587f7b9029ab8d3df2c6f3021753ab1cb5273b +size 404045 diff --git a/groundingLMM/images/demo_resources/balloon.jpg b/groundingLMM/images/demo_resources/balloon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b561334d539fec1ed1557183bdab1ba56c46fbad --- /dev/null +++ b/groundingLMM/images/demo_resources/balloon.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31aababc807c5b12a02653db7df7ac8877ec39a00328bf0ffce0c444b2607345 +size 1028372 diff --git a/groundingLMM/images/demo_resources/beetle.jpg b/groundingLMM/images/demo_resources/beetle.jpg new file mode 100644 index 0000000000000000000000000000000000000000..de219d1992a49792c4642a5f9a6dcd58025358fc --- /dev/null +++ b/groundingLMM/images/demo_resources/beetle.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c5a5e2fb2a7bc8ed04f149c56581ef36530751aa732d9d30045fb7edcbf3849 +size 723362 diff --git a/groundingLMM/images/demo_resources/church.jpg b/groundingLMM/images/demo_resources/church.jpg new file mode 100644 index 0000000000000000000000000000000000000000..177d3e1779f38b546a822dc2c8c6daf2c57f7e6b --- /dev/null +++ b/groundingLMM/images/demo_resources/church.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d77b8576cb2bc8cd67050c5388ad0102529755ea3b8402c867d620f24dafccf6 +size 951633 diff --git a/groundingLMM/images/demo_resources/elephant.jpg b/groundingLMM/images/demo_resources/elephant.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c55f8d09e2c5638af07131e9452256e114129a08 --- /dev/null +++ b/groundingLMM/images/demo_resources/elephant.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d3c05c8735b0112cf45eaacac3c64737fbec158f921c8407530350a87f61b36 +size 1322984 diff --git a/groundingLMM/images/demo_resources/japan.jpg b/groundingLMM/images/demo_resources/japan.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9947c45217ae613987de1303e8f11d3356034c70 --- /dev/null +++ b/groundingLMM/images/demo_resources/japan.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:608bc7edb0dee3ace2ffa7c097081371d318a211f3e388700a4378ca53bb0a06 +size 1273030 diff --git a/groundingLMM/images/demo_resources/joker.png b/groundingLMM/images/demo_resources/joker.png new file mode 100644 index 0000000000000000000000000000000000000000..ceda00c1a4cf5d7db48c13f39bb6f9223067e112 --- /dev/null +++ b/groundingLMM/images/demo_resources/joker.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92883ef878407b533ce3d6cac85f9756bc2e06fa14d803da75ddd894337a5fc8 +size 3156278 diff --git a/groundingLMM/images/demo_resources/joker_old.jpg b/groundingLMM/images/demo_resources/joker_old.jpg new file mode 100644 index 0000000000000000000000000000000000000000..646ffde27561629b1ad41b41f487ccb7d3ac60f0 --- /dev/null +++ b/groundingLMM/images/demo_resources/joker_old.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f428f4cb600ccb764da5c86810db10b701d66fbc791522046b84e0d5f589305 +size 230802 diff --git a/groundingLMM/images/demo_resources/mansion.jpg b/groundingLMM/images/demo_resources/mansion.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2233d5eb113fcf98cea46b29650968a45458eece --- /dev/null +++ b/groundingLMM/images/demo_resources/mansion.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4821f03b87e13cdaca08f1b34fdb65a3144683c50d514aad13f58795f9bb1fe1 +size 1447667 diff --git a/groundingLMM/images/demo_resources/old.jpg b/groundingLMM/images/demo_resources/old.jpg new file mode 100644 index 0000000000000000000000000000000000000000..30ad9827cc0c8ef730d95070ee3d27c303e9ceb5 --- /dev/null +++ b/groundingLMM/images/demo_resources/old.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c54610feffe9b283c26b8e36058de53da3f9846b9688a4e3fba1af0aed22fc7a +size 520788 diff --git a/groundingLMM/images/demo_resources/paddle.jpg b/groundingLMM/images/demo_resources/paddle.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a21707b91537a6457a6b98b32716c6826f1cd5fb --- /dev/null +++ b/groundingLMM/images/demo_resources/paddle.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cb7a2996ff78a35bf94d99e316321745f14b942fc347f674798d356c57602c6 +size 759786 diff --git a/groundingLMM/images/demo_resources/snow.png b/groundingLMM/images/demo_resources/snow.png new file mode 100644 index 0000000000000000000000000000000000000000..ecf6e98e38e707d9d06b2ab7a242d5bc404397b1 --- /dev/null +++ b/groundingLMM/images/demo_resources/snow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:519ca575806798ee4f0c47b3f6ad52179489803f5fab7b64b379edd29879a49b +size 1603841 diff --git a/groundingLMM/images/demo_resources/surfer.jpg b/groundingLMM/images/demo_resources/surfer.jpg new file mode 100644 index 0000000000000000000000000000000000000000..374817f4cafc89abc895bfaa15adde9fff50a5a7 --- /dev/null +++ b/groundingLMM/images/demo_resources/surfer.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:212a0fd864243cc71efeaff4e92c285349c944c111d1c1509875fd1c512e7485 +size 435229 diff --git a/groundingLMM/images/demo_resources/tokyo.jpg b/groundingLMM/images/demo_resources/tokyo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dcbb5278551dc2fc4d0388a2449d9ce106006d32 --- /dev/null +++ b/groundingLMM/images/demo_resources/tokyo.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:264d8c736e80522d75f525ad7d0e9095a1a7259f99eef5790de040e9e7418a32 +size 314476 diff --git a/groundingLMM/images/demo_resources/yacht.jpg b/groundingLMM/images/demo_resources/yacht.jpg new file mode 100644 index 0000000000000000000000000000000000000000..92fc69563b55ce8610d18409f10653deae042ac4 --- /dev/null +++ b/groundingLMM/images/demo_resources/yacht.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78b512056fc8b66801d153384cfb344d1c9e456dd8bd9ccfd61cb7ce593f44d1 +size 1442523 diff --git a/groundingLMM/images/glamm/dataset_pipeline.png b/groundingLMM/images/glamm/dataset_pipeline.png new file mode 100644 index 0000000000000000000000000000000000000000..8c0d53d4b80184aa1a4a870015dcc675e33d90ee --- /dev/null +++ b/groundingLMM/images/glamm/dataset_pipeline.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bda0f7522138fe70ba644e646ce7e329348d25d79846b529cac07d174bebae5b +size 3950388 diff --git a/groundingLMM/images/glamm/grand_f_samples.png b/groundingLMM/images/glamm/grand_f_samples.png new file mode 100644 index 0000000000000000000000000000000000000000..89d806921cd53e938f607ab694aaa9e7085e5d2b --- /dev/null +++ b/groundingLMM/images/glamm/grand_f_samples.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a8b59078431a6ab1b948a13be620dfd1bd7f4b26e0184d1d02890538ca11cc1 +size 18631376 diff --git a/groundingLMM/images/glamm/grand_sample_1.png b/groundingLMM/images/glamm/grand_sample_1.png new file mode 100644 index 0000000000000000000000000000000000000000..250ef67952a4016208279304bfffd4c4c8c94485 --- /dev/null +++ b/groundingLMM/images/glamm/grand_sample_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5f5557beab5070e1ae099f1971aafebaf92a1ad89ec187097170848526ee974 +size 3548359 diff --git a/groundingLMM/images/glamm/grand_sample_2.png b/groundingLMM/images/glamm/grand_sample_2.png new file mode 100644 index 0000000000000000000000000000000000000000..27fac202decd9a31403974166c10f6b36d4cc810 --- /dev/null +++ b/groundingLMM/images/glamm/grand_sample_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76cddfce3c8096697cb31ed0272fd20d31491da8262137b9610300e20fc21b95 +size 4242216 diff --git a/groundingLMM/images/glamm/model_arch.png b/groundingLMM/images/glamm/model_arch.png new file mode 100644 index 0000000000000000000000000000000000000000..6ef49f373cf54a7be4b021e655b40a3d377b4eaa --- /dev/null +++ b/groundingLMM/images/glamm/model_arch.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cefd21e12185c90327e22d959be822d37b1427fc73cf9438f43eac040eb5470 +size 3900698 diff --git a/groundingLMM/images/glamm/results_1_gcg.png b/groundingLMM/images/glamm/results_1_gcg.png new file mode 100644 index 0000000000000000000000000000000000000000..545c3f1508e031e378ae6647dcc794f8daca21d2 --- /dev/null +++ b/groundingLMM/images/glamm/results_1_gcg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa3be51f34332ae6835abc3f22c804fa4cd05d160597476bc03f608d5ded85d4 +size 6773301 diff --git a/groundingLMM/images/glamm/results_2_downstream.png b/groundingLMM/images/glamm/results_2_downstream.png new file mode 100644 index 0000000000000000000000000000000000000000..721c4316b14d10e104d4e09cb637aac4470c2cc3 --- /dev/null +++ b/groundingLMM/images/glamm/results_2_downstream.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ee9ac29d37a9ca521ffc92313db0901d0678a9032cf66cba30e0291ba2487c2 +size 5192634 diff --git a/groundingLMM/images/glamm/results_3_refseg.png b/groundingLMM/images/glamm/results_3_refseg.png new file mode 100644 index 0000000000000000000000000000000000000000..f469dfa597c0e212acc3942962ae9e64c59b782e --- /dev/null +++ b/groundingLMM/images/glamm/results_3_refseg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac701bced0f9dd5eac65ad2eddb111d22dc4346ec48b463a0c3bdb774d93011c +size 4114721 diff --git a/groundingLMM/images/glamm/results_4_conv.png b/groundingLMM/images/glamm/results_4_conv.png new file mode 100644 index 0000000000000000000000000000000000000000..fb71b5ed0438370806f3a38182bdccb3b17a687d --- /dev/null +++ b/groundingLMM/images/glamm/results_4_conv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92ec3717576a520f7262be3cb32b92c10084e18dc08e5fe75331c3e394718fb5 +size 10854338 diff --git a/groundingLMM/images/glamm/results_4_regcap.png b/groundingLMM/images/glamm/results_4_regcap.png new file mode 100644 index 0000000000000000000000000000000000000000..7ab90f54c9ab963bb15472d1d773ed9e130f6682 --- /dev/null +++ b/groundingLMM/images/glamm/results_4_regcap.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fde4063f61b5716332aba3addbf4ad2dbdadc7f382671c8b5a7048b1eab4aa0e +size 4495262 diff --git a/groundingLMM/images/glamm/results_5_conv.png b/groundingLMM/images/glamm/results_5_conv.png new file mode 100644 index 0000000000000000000000000000000000000000..63a19a36c03dbd37a93bf6ba0c35ba90dec22641 --- /dev/null +++ b/groundingLMM/images/glamm/results_5_conv.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b05de37ff23a601712673409ab34a24d02d2eb51b963a0e86188df320119fb3 +size 11148492 diff --git a/groundingLMM/images/glamm/results_6_cap.png b/groundingLMM/images/glamm/results_6_cap.png new file mode 100644 index 0000000000000000000000000000000000000000..c79502c2438f8d0c1d71565a2a48945bf9be7eb4 --- /dev/null +++ b/groundingLMM/images/glamm/results_6_cap.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6047b18b82fc12ffb9d248bd426cd265dd1ac913671a5e0de85834ce77f95c9 +size 7471194 diff --git a/groundingLMM/images/glamm/results_7_gcg_combined.png b/groundingLMM/images/glamm/results_7_gcg_combined.png new file mode 100644 index 0000000000000000000000000000000000000000..0e91fba950a3cbd1b106190b18266865167d6630 --- /dev/null +++ b/groundingLMM/images/glamm/results_7_gcg_combined.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44789f1937142cbf41a1c4f70a267fea39f20c49c547742e12212e1a171431a7 +size 8077062 diff --git a/groundingLMM/images/logos/face.png b/groundingLMM/images/logos/face.png new file mode 100644 index 0000000000000000000000000000000000000000..f31369f36f9e51b83063385d5c20d5c58af36ca1 --- /dev/null +++ b/groundingLMM/images/logos/face.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0604dc56584fa93d744207dae1b98cbc082bd3a8e693a6c98db0183e8612b90 +size 120661 diff --git a/groundingLMM/images/tables/GCG_Table.png b/groundingLMM/images/tables/GCG_Table.png new file mode 100644 index 0000000000000000000000000000000000000000..9e9bf611f37383efbf1dcb0f13b980d2f7ac3d14 --- /dev/null +++ b/groundingLMM/images/tables/GCG_Table.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:869643ef9810a898215a8ec31759ef55d5112f4545ac9f11895c1f1929143e21 +size 578646 diff --git a/groundingLMM/images/tables/ReferSeg_Table.png b/groundingLMM/images/tables/ReferSeg_Table.png new file mode 100644 index 0000000000000000000000000000000000000000..14f3e9e29f4acd85bb76b23620ddf07a958c9ef7 --- /dev/null +++ b/groundingLMM/images/tables/ReferSeg_Table.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbb27089fb0be7d48a3436ae8ddfaba3d226b7f211f14b4cd8a3346c9ba7b1b3 +size 181743 diff --git a/groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/.ninja_deps b/groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/.ninja_deps new file mode 100644 index 0000000000000000000000000000000000000000..ef211c4475ce7c71ae46cb04ea410d1cbb44b849 --- /dev/null +++ b/groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/.ninja_deps @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f82800517936a41aedb900d35e4e51439d98ef942b1edf9f1246296d19a7ae3 +size 983460 diff --git a/groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/mmcv/ops/csrc/pytorch/cuda/cudabind.o b/groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/mmcv/ops/csrc/pytorch/cuda/cudabind.o new file mode 100644 index 0000000000000000000000000000000000000000..755f75ea9d269194744d4382a51b6e3fde04d415 --- /dev/null +++ b/groundingLMM/mmcv/build/temp.linux-x86_64-cpython-310/mmcv/ops/csrc/pytorch/cuda/cudabind.o @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db0689aee45aac780c1f3ae6271f94633e998a9271b7826facaf5e10b4d9a223 +size 190568 diff --git a/groundingLMM/mmcv/docs/en/_static/community/3.png b/groundingLMM/mmcv/docs/en/_static/community/3.png new file mode 100644 index 0000000000000000000000000000000000000000..41fa74d3b1b7ceae7a8eefb6f5f3cf25a33250a0 --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/community/3.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f1e74b1a76b7a96b8a58731dc17c0419efd177eb863cb125a90ec657ba3d529 +size 182941 diff --git a/groundingLMM/mmcv/docs/en/_static/flow_raw_images.png b/groundingLMM/mmcv/docs/en/_static/flow_raw_images.png new file mode 100644 index 0000000000000000000000000000000000000000..fdf3cd98a392d110ef0c2a0c4cd9efe927f5daf7 --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/flow_raw_images.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01c88e247d12d8bdbdcdfb7080572e4f6c9191c944381c8349e7232bcf2f1337 +size 1515531 diff --git a/groundingLMM/mmcv/docs/en/_static/flow_warp.png b/groundingLMM/mmcv/docs/en/_static/flow_warp.png new file mode 100644 index 0000000000000000000000000000000000000000..60f53d85939c60b7d038331fe7cad3118c78763c --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/flow_warp.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:243859c897f342fef7d03116bddb39dd05c1c0bb8f43c2b5422e330f90698f93 +size 760348 diff --git a/groundingLMM/mmcv/docs/en/_static/flow_warp_diff.png b/groundingLMM/mmcv/docs/en/_static/flow_warp_diff.png new file mode 100644 index 0000000000000000000000000000000000000000..7989c9636bd852ce7512457c64192e630ea27cb7 --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/flow_warp_diff.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa0e1308dca16a1c60e43e451b933221c43b857774523d1584ff6166b35b7603 +size 1379939 diff --git a/groundingLMM/mmcv/docs/en/_static/progress.gif b/groundingLMM/mmcv/docs/en/_static/progress.gif new file mode 100644 index 0000000000000000000000000000000000000000..d06ef1a36b15488be84f3f0d594388398cb92075 --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/progress.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7c8eb74c612be3da8c9c936e1d95c3ed2b10828c24f444881b596c46e10aa16 +size 100747 diff --git a/groundingLMM/mmcv/docs/en/_static/wechat_qrcode.jpg b/groundingLMM/mmcv/docs/en/_static/wechat_qrcode.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e6fc58abd550e993cf974646444eb3801292836 --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/wechat_qrcode.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3c3f05f387296b9d5e88213697fc03b5d1a46eff6e45b5b8a8bb4ed4d1cf56f +size 144827 diff --git a/groundingLMM/mmcv/docs/en/_static/zhihu_qrcode.jpg b/groundingLMM/mmcv/docs/en/_static/zhihu_qrcode.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bf6acda551168e7a02144aafb82924bfbbeb670f --- /dev/null +++ b/groundingLMM/mmcv/docs/en/_static/zhihu_qrcode.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9b4874df2304e5ee8cff75a7462d794ccae29b2517a8634ef66873e67b928f7 +size 2471708 diff --git a/groundingLMM/mmcv/tests/data/batched_nms_data.pkl b/groundingLMM/mmcv/tests/data/batched_nms_data.pkl new file mode 100644 index 0000000000000000000000000000000000000000..4a22b6c398e13c2fa16d9e2fd9348bcbfd278603 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/batched_nms_data.pkl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e66917d77418aedc6835b77ed4f82094a7891eb138294ce4b2edae1078cd1488 +size 37884 diff --git a/groundingLMM/mmcv/tests/data/for_3d_ops/features_for_fps_distance.npy b/groundingLMM/mmcv/tests/data/for_3d_ops/features_for_fps_distance.npy new file mode 100644 index 0000000000000000000000000000000000000000..1358e4796513d6a2e1d695fe25716817378f9892 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_3d_ops/features_for_fps_distance.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b10cab9da6f6fce9b630718cb0ae7ead2b516a52afd87ae2896ec2e5c23b0a78 +size 32896 diff --git a/groundingLMM/mmcv/tests/data/for_3d_ops/fps_idx.npy b/groundingLMM/mmcv/tests/data/for_3d_ops/fps_idx.npy new file mode 100644 index 0000000000000000000000000000000000000000..9fef3abc71b078d1923880b41b9308b34d5dc356 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_3d_ops/fps_idx.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5930d29ad3c0200a340fb379bdcb1e1409a5003b48d24b617fdfcee5500ae3b +size 256 diff --git a/groundingLMM/mmcv/tests/data/for_3d_ops/test_voxel.npy b/groundingLMM/mmcv/tests/data/for_3d_ops/test_voxel.npy new file mode 100644 index 0000000000000000000000000000000000000000..98d77bf176d52576b4b30fd21970a3efca622300 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_3d_ops/test_voxel.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c50547ab7cc60ef7d9aff499549f846bf3764e9691b72b7b531841d9818507ad +size 1663049 diff --git a/groundingLMM/mmcv/tests/data/for_ccattention/ccattention_input.bin b/groundingLMM/mmcv/tests/data/for_ccattention/ccattention_input.bin new file mode 100644 index 0000000000000000000000000000000000000000..1d55e356c03c58d12dfd9d9530884c55e5733734 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_ccattention/ccattention_input.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe5c2b47ccc5f6bfa3a7909d855a0c285f3cde18132fd8f5689d785577db5425 +size 259200 diff --git a/groundingLMM/mmcv/tests/data/for_ccattention/ccattention_output.bin b/groundingLMM/mmcv/tests/data/for_ccattention/ccattention_output.bin new file mode 100644 index 0000000000000000000000000000000000000000..1d55e356c03c58d12dfd9d9530884c55e5733734 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_ccattention/ccattention_output.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe5c2b47ccc5f6bfa3a7909d855a0c285f3cde18132fd8f5689d785577db5425 +size 259200 diff --git a/groundingLMM/mmcv/tests/data/for_psa_mask/psa_input.bin b/groundingLMM/mmcv/tests/data/for_psa_mask/psa_input.bin new file mode 100644 index 0000000000000000000000000000000000000000..452c846ca2571b3c5909ef18dd40aad37f9eafd0 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_psa_mask/psa_input.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4272e43ce1ea479c6c493ecdfd11cd85ad3299c6f5de49731addfe5f7ec9bca0 +size 16384 diff --git a/groundingLMM/mmcv/tests/data/for_psa_mask/psa_output_collect.bin b/groundingLMM/mmcv/tests/data/for_psa_mask/psa_output_collect.bin new file mode 100644 index 0000000000000000000000000000000000000000..8236c525bc13154c78ef80a93346e20a5cb8ad2e --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_psa_mask/psa_output_collect.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2139cf57e61b2a05013f6375063de2625784b1736019c6316ef223e462c77568 +size 65536 diff --git a/groundingLMM/mmcv/tests/data/for_psa_mask/psa_output_distribute.bin b/groundingLMM/mmcv/tests/data/for_psa_mask/psa_output_distribute.bin new file mode 100644 index 0000000000000000000000000000000000000000..3e01344ccc7fa069e4a574b032107c7a11be840d --- /dev/null +++ b/groundingLMM/mmcv/tests/data/for_psa_mask/psa_output_distribute.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c499912a0de6e9293999a00b25970e98184b0bbdefa0de2dab751f9389134cf8 +size 65536 diff --git a/groundingLMM/mmcv/tests/data/model_zoo/mmcv_home/test.pth b/groundingLMM/mmcv/tests/data/model_zoo/mmcv_home/test.pth new file mode 100644 index 0000000000000000000000000000000000000000..4f1d81dc3bfc525a715b00ba13574dc20f080dbc --- /dev/null +++ b/groundingLMM/mmcv/tests/data/model_zoo/mmcv_home/test.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9190d6192d383ace309b39ccbebbef31fde1e3ac2392dc44427f2b5ad59d4f3 +size 341 diff --git a/groundingLMM/mmcv/tests/data/model_zoo/mmcv_home/val.pth b/groundingLMM/mmcv/tests/data/model_zoo/mmcv_home/val.pth new file mode 100644 index 0000000000000000000000000000000000000000..4b5fa49ac59a7716dff8ff005773987748c3ef79 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/model_zoo/mmcv_home/val.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e5bb73ff8d81d90fd425d220991df8c1d1bc0c7ebab48534c59f8b66d871f6e +size 341 diff --git a/groundingLMM/mmcv/tests/data/palette.gif b/groundingLMM/mmcv/tests/data/palette.gif new file mode 100644 index 0000000000000000000000000000000000000000..8f6ce90d6d88dd1df733d2ed21f2b7a393918080 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/palette.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:984280e4073d18dde14fbe0f06d62e71a6ae4b5aa76fa3e4d83a481a574ba571 +size 127585 diff --git a/groundingLMM/mmcv/tests/data/patches/0.npy b/groundingLMM/mmcv/tests/data/patches/0.npy new file mode 100644 index 0000000000000000000000000000000000000000..a6cf74ac732c2116d118cd89b9ab16b4db4de96f --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec397812a6d599c57f8f3e28618489ea188835a671bafc4717eed6a543319b3b +size 30080 diff --git a/groundingLMM/mmcv/tests/data/patches/1.npy b/groundingLMM/mmcv/tests/data/patches/1.npy new file mode 100644 index 0000000000000000000000000000000000000000..d3a372669c8efb59bb108de18a1723ac6ec33f48 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/1.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b012ee08c4004ebaefaa6627db79e046881afda35c051b3fa90de081a45dc99 +size 45833 diff --git a/groundingLMM/mmcv/tests/data/patches/2.npy b/groundingLMM/mmcv/tests/data/patches/2.npy new file mode 100644 index 0000000000000000000000000000000000000000..0d0c9b06c36edef9a4736639a4548bdaab32015f --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/2.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef99c61ed8922333ad9b13579ee1e5a1537334fa7895237747ef2dfab6bb76a4 +size 45080 diff --git a/groundingLMM/mmcv/tests/data/patches/3.npy b/groundingLMM/mmcv/tests/data/patches/3.npy new file mode 100644 index 0000000000000000000000000000000000000000..fed56e8524196336664c89fee3251af6b01006c9 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/3.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5a9396b06b7c3724a0d09487922b17ae9d84ac9571e104f8a12aeb71e05e754 +size 120080 diff --git a/groundingLMM/mmcv/tests/data/patches/4.npy b/groundingLMM/mmcv/tests/data/patches/4.npy new file mode 100644 index 0000000000000000000000000000000000000000..f4231588650a588b4ac6b6fdf2b13da255fac6fe --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/4.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0434c5528c05ddf10a46d902867f8016dcb17073c21622a0f8dd968dea75c983 +size 135080 diff --git a/groundingLMM/mmcv/tests/data/patches/pad0_0.npy b/groundingLMM/mmcv/tests/data/patches/pad0_0.npy new file mode 100644 index 0000000000000000000000000000000000000000..7e92a2fbcedce554eceb1fdf889818700f471481 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad0_0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a52f6fa1bf4214fc95cd3374b99945e1f39020531938cfeb3c3785512c81e432 +size 43280 diff --git a/groundingLMM/mmcv/tests/data/patches/pad0_1.npy b/groundingLMM/mmcv/tests/data/patches/pad0_1.npy new file mode 100644 index 0000000000000000000000000000000000000000..f32a1c60c159667b4847338c98f07d2c9ce278b3 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad0_1.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33ca1e82f85e0391a48278df7408c10de5d1e8d9034f956f2ca1fda5a4c31ea5 +size 65783 diff --git a/groundingLMM/mmcv/tests/data/patches/pad0_2.npy b/groundingLMM/mmcv/tests/data/patches/pad0_2.npy new file mode 100644 index 0000000000000000000000000000000000000000..7109c3338a837d238569f6fc779d0e1cef0f0a3f --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad0_2.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb0461cd69122c6d57b5cde76b210461a95b4eb47edf5fa4ecfe48dd59b0cc03 +size 64880 diff --git a/groundingLMM/mmcv/tests/data/patches/pad0_3.npy b/groundingLMM/mmcv/tests/data/patches/pad0_3.npy new file mode 100644 index 0000000000000000000000000000000000000000..839fec406a98269a4e3b85cb1d0071c0245570a1 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad0_3.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ca38fefed803258cdeaf8302a9e07db5b85a0da14fd5291574d14208cafdaa2 +size 172520 diff --git a/groundingLMM/mmcv/tests/data/patches/pad0_4.npy b/groundingLMM/mmcv/tests/data/patches/pad0_4.npy new file mode 100644 index 0000000000000000000000000000000000000000..d2882b537fd35600e051515cae8e22ee504d823f --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad0_4.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbc2f25246beeffff02ad601c00a4501c1e35c09e6a6fbe087f02f387c6df923 +size 193940 diff --git a/groundingLMM/mmcv/tests/data/patches/pad_0.npy b/groundingLMM/mmcv/tests/data/patches/pad_0.npy new file mode 100644 index 0000000000000000000000000000000000000000..7e92a2fbcedce554eceb1fdf889818700f471481 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad_0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a52f6fa1bf4214fc95cd3374b99945e1f39020531938cfeb3c3785512c81e432 +size 43280 diff --git a/groundingLMM/mmcv/tests/data/patches/pad_1.npy b/groundingLMM/mmcv/tests/data/patches/pad_1.npy new file mode 100644 index 0000000000000000000000000000000000000000..e5d7912cfb514e4f458f4456739d5678be7f2dd2 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad_1.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b558bd334818e25fa42d9b5d6ecb804e6e5101891605720b2658f2b5c29fc9de +size 65783 diff --git a/groundingLMM/mmcv/tests/data/patches/pad_2.npy b/groundingLMM/mmcv/tests/data/patches/pad_2.npy new file mode 100644 index 0000000000000000000000000000000000000000..47b6539c4d06023f733c9488f810d5235142ad4a --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad_2.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:813a6ab4e56acaecd9eab3346ac609e727a466c73c136ba7b7e19f0e8fcd7310 +size 64880 diff --git a/groundingLMM/mmcv/tests/data/patches/pad_3.npy b/groundingLMM/mmcv/tests/data/patches/pad_3.npy new file mode 100644 index 0000000000000000000000000000000000000000..b116a69aad54490d065fe507e15047c56678a7f1 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad_3.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b58e5e374262f19f88d9bef26af14d2aea03ecab1e60d079adcdb3a0f876c563 +size 172520 diff --git a/groundingLMM/mmcv/tests/data/patches/pad_4.npy b/groundingLMM/mmcv/tests/data/patches/pad_4.npy new file mode 100644 index 0000000000000000000000000000000000000000..65cfa81f3c72f2977bade1530e9e7687acb116d6 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/pad_4.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96fcada98c5cd5063200f542949bce475b7c4bbfb6a2ebfcf306ef032d2f0774 +size 193940 diff --git a/groundingLMM/mmcv/tests/data/patches/scale_0.npy b/groundingLMM/mmcv/tests/data/patches/scale_0.npy new file mode 100644 index 0000000000000000000000000000000000000000..7e92a2fbcedce554eceb1fdf889818700f471481 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/scale_0.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a52f6fa1bf4214fc95cd3374b99945e1f39020531938cfeb3c3785512c81e432 +size 43280 diff --git a/groundingLMM/mmcv/tests/data/patches/scale_1.npy b/groundingLMM/mmcv/tests/data/patches/scale_1.npy new file mode 100644 index 0000000000000000000000000000000000000000..6eb7b779ce5738fc9db6a59c068d53ed67efcfcc --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/scale_1.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0e3fe1824d9d160e4f838a0ba7310c6a134bb755c254aa68e87093d51363a3d +size 55358 diff --git a/groundingLMM/mmcv/tests/data/patches/scale_2.npy b/groundingLMM/mmcv/tests/data/patches/scale_2.npy new file mode 100644 index 0000000000000000000000000000000000000000..c9fc9c92882738a9ef1dea24df783e219e1a06b1 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/scale_2.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:936d5fa0c7e6e7db7d217adc0d0b51de5be1bdae6d0a18924b13cf2bfbf3a81f +size 54530 diff --git a/groundingLMM/mmcv/tests/data/patches/scale_3.npy b/groundingLMM/mmcv/tests/data/patches/scale_3.npy new file mode 100644 index 0000000000000000000000000000000000000000..17dffa2b4259dc892e2c229beefa1bfbd56a9090 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/scale_3.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4316d4971f006fc67050f259327a2d5ba893170aef62b6e0a748f71f63894683 +size 144080 diff --git a/groundingLMM/mmcv/tests/data/patches/scale_4.npy b/groundingLMM/mmcv/tests/data/patches/scale_4.npy new file mode 100644 index 0000000000000000000000000000000000000000..d31937877c57f72ad306a4f5d026defa6ecd25e0 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/patches/scale_4.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6132538f15ba075f3b6ab64404425d2a339872db03c5268682a2b54d80e8ec77 +size 162080 diff --git a/groundingLMM/mmcv/tests/data/test.mp4 b/groundingLMM/mmcv/tests/data/test.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..15fcd1ca7d55afe8454486aec3186c42fcfaeebb --- /dev/null +++ b/groundingLMM/mmcv/tests/data/test.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b83c900753d27bb8d0d50bce377111798506b5062f87af70f5107303920bba7f +size 300601 diff --git a/groundingLMM/mmcv/tests/data/uint16-5channel.tif b/groundingLMM/mmcv/tests/data/uint16-5channel.tif new file mode 100644 index 0000000000000000000000000000000000000000..8d588fb4f782d50e6c2baff680caf9c7af091694 --- /dev/null +++ b/groundingLMM/mmcv/tests/data/uint16-5channel.tif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:08beadad16cfb97f143612772d21a4b54ebc174b28550484d905b5cf654888f7 +size 212483