diff --git a/audio.py b/audio.py index 44b7bc9fbcd36c450248aee495951e85a792e2ba..543885de8c6615dc427dac97f4812745587e91a1 100644 --- a/audio.py +++ b/audio.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/audio", ) diff --git a/autocomplete.py b/autocomplete.py index b502e83c481e184038dc400a653278da3e9330cd..75c522e680659e612dfa27670f8b703b8e25ce63 100644 --- a/autocomplete.py +++ b/autocomplete.py @@ -14,7 +14,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/autocomplete", ) diff --git a/badge.py b/badge.py index 64e059ed1051a7fd2b7d61f6fdb1aa6bbf28c55a..1c269e80556f95fb2565e501a176d96d0106f1f9 100644 --- a/badge.py +++ b/badge.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/badge", ) diff --git a/basic_animation.py b/basic_animation.py index adf0086666fad1c4693ce6ed400d305865559cf3..f1200548d901f95cda713f6a3c31a21d33182be1 100644 --- a/basic_animation.py +++ b/basic_animation.py @@ -35,7 +35,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/basic_animation", ) diff --git a/bootstrap.py b/bootstrap.py index 18c67c3cc268f08ff8786830954db29ab9fa074a..fe76bdad2ead7f302e735b288edbf9e5cd528865 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -3,7 +3,7 @@ import mesop as me @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), stylesheets=[ "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css", diff --git a/box.py b/box.py index e11e7394e5a197a39aff6996208f1169263f75ac..d7667664f9e5fd0967686b41cf4b732220fbd9bf 100644 --- a/box.py +++ b/box.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/box", ) diff --git a/button.py b/button.py index 7749646780278ef35f9cd814bccb7a91a1597a7a..500e24c27c93d75a3ff7f9313849f1e9ca2ab19b 100644 --- a/button.py +++ b/button.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/button", ) diff --git a/button_toggle.py b/button_toggle.py index b5465b88e579154bed23fc4c0bba3cc891a1fc40..69234d1d47dc35c1a3bd49affe56f36a607e5b3b 100644 --- a/button_toggle.py +++ b/button_toggle.py @@ -17,7 +17,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/button_toggle", ) diff --git a/card.py b/card.py index 82f467ac3cdbd1c84965fb358dba58235f802176..9a27798f9f16111f6707ac1a556a7c966514e7f6 100644 --- a/card.py +++ b/card.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"], + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"], ), path="/card", ) diff --git a/chat.py b/chat.py index 2055585af2d0d4ced98d2b59dcd065ea6ba33dec..e8b5f68fd8dd37ae083b0d23622028f0c5a30678 100644 --- a/chat.py +++ b/chat.py @@ -11,7 +11,7 @@ def on_load(e: me.LoadEvent): @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/chat", title="Mesop Demo Chat", diff --git a/chat_inputs.py b/chat_inputs.py index 4cbae0f4c31feaffbfeca7eb71b5ddccb18782aa..367f40615a7907a316b56438c7460ad5daeda0c8 100644 --- a/chat_inputs.py +++ b/chat_inputs.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/chat_inputs", ) diff --git a/checkbox.py b/checkbox.py index 3c52453d78845771c45668973fc4cc5be6143b2f..e07430ccfa9044e9dfb0fdb8ebba64ea9e120ba2 100644 --- a/checkbox.py +++ b/checkbox.py @@ -18,7 +18,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/checkbox", ) diff --git a/code_demo.py b/code_demo.py index ca1fb71d4e4508900efabc5395a2b5f4a8ed1081..d75b32376e9c531dc09a3de3bf5facdaf78d0e63 100644 --- a/code_demo.py +++ b/code_demo.py @@ -10,7 +10,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/code_demo", ) diff --git a/copy_to_clipboard/app.py b/copy_to_clipboard/app.py index 75da206d682b5c44281e1d8b7f041cc3323b275e..0abeb8ae0c893731bb4be0856542bce44dedadee 100644 --- a/copy_to_clipboard/app.py +++ b/copy_to_clipboard/app.py @@ -20,7 +20,7 @@ def on_load(e: me.LoadEvent): on_load=on_load, path="/copy_to_clipboard", security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"], + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"], allowed_script_srcs=["https://cdn.jsdelivr.net"], ), ) diff --git a/date_picker.py b/date_picker.py index f3f1e0af9390eba00937c43291f8a256d1bb2c4d..4f62579c0f769267fb3a120284558bbe19f03f29 100644 --- a/date_picker.py +++ b/date_picker.py @@ -16,7 +16,7 @@ def on_load(e: me.LoadEvent): @me.page( path="/date_picker", security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), on_load=on_load, ) diff --git a/date_range_picker.py b/date_range_picker.py index 9b2d094c37e098c844e67b261adc36bfad2a83bf..f7a9de542cb8d4a386d21c0ec5b7296c93819527 100644 --- a/date_range_picker.py +++ b/date_range_picker.py @@ -21,7 +21,7 @@ def on_load(e: me.LoadEvent): @me.page( path="/date_range_picker", security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), on_load=on_load, ) diff --git a/density.py b/density.py index 51cd024cbcb3138791ff16941ba3886a8e674830..1270d1d498e9ae29866915f0ffe2e50c1d8aeb8b 100644 --- a/density.py +++ b/density.py @@ -12,7 +12,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/density", ) diff --git a/deploy_to_hf.sh b/deploy_to_hf.sh index d2c72753a8c9f9d9e3a577e8ac7b5e680e03d3cd..29900b0ee02b111e62d1178ac6de3a574fd96452 100755 --- a/deploy_to_hf.sh +++ b/deploy_to_hf.sh @@ -35,7 +35,7 @@ echo "Updating allowed iframe parents to include hugging face spaces site..." # Find all .py files and update the allowed_iframe_parents list find . -name "*.py" -type f | while read -r file; do # Use sed with -i.bak so it woroks on MacOs - sed -i.bak 's/allowed_iframe_parents=\["https:\/\/google\.github\.io"\]/allowed_iframe_parents=["https:\/\/mesop-dev.github.io", "https:\/\/huggingface.co"]/' "$file" + sed -i.bak 's/allowed_iframe_parents=\["https:\/\/mesop-dev\.github\.io"\]/allowed_iframe_parents=["https:\/\/mesop-dev.github.io", "https:\/\/huggingface.co"]/' "$file" # Remove the backup file created by sed rm "${file}.bak" done @@ -52,6 +52,6 @@ git commit -m "Commit" # on this dest directory before. git remote add hf git@hf.co:spaces/richard-to/mesop || true -git push --set-upstream hf main --force +git push hf main --force echo "Pushed to: git@hf.co:spaces/richard-to/mesop. Check the logs to see that it's deployed correctly." diff --git a/dialog.py b/dialog.py index 332c1abbb5fff5739e9146c561c5f4e1c9483548..ca16ed26c3f530d9589551ab58c2a15aa965dfa6 100644 --- a/dialog.py +++ b/dialog.py @@ -17,7 +17,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/dialog", ) diff --git a/divider.py b/divider.py index 0aaacc99087b444e02e28f5344f01f0e20de16d6..a480a6d99efd594ff5f50ea2803eedd8ebbbf92e 100644 --- a/divider.py +++ b/divider.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/divider", ) diff --git a/embed.py b/embed.py index 19674270867e734b6bc8c32581ac3fee911af09e..f5a23145da0117e0a9b4536d72e1ef4b2bbaf3e8 100644 --- a/embed.py +++ b/embed.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/embed", ) diff --git a/expansion_panel.py b/expansion_panel.py index a2a8aa8684c770dd9222c5a1c93ba8098bcd4dbd..969a34b0e4570e5539c2aec04d66c4cbc992582f 100644 --- a/expansion_panel.py +++ b/expansion_panel.py @@ -20,7 +20,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/expansion_panel", ) diff --git a/fancy_chat.py b/fancy_chat.py index afa33efef6624bff489cc7c67e4b0f12bf589e29..a3ea416eca069144b5adbb361e3a3f1cf2ee53a3 100644 --- a/fancy_chat.py +++ b/fancy_chat.py @@ -70,7 +70,7 @@ def on_load(e: me.LoadEvent): @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), title="Fancy Mesop Demo Chat", path="/fancy_chat", diff --git a/feedback.py b/feedback.py index a7cfe31533975a4fd60f5879d34698f7f8d98098..ada3db593de9482c901bafe040b9475951407ef5 100644 --- a/feedback.py +++ b/feedback.py @@ -26,7 +26,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/feedback", ) diff --git a/form_billing.py b/form_billing.py index 6349fc222ea83cf644b2a9313810e15d5956aef8..f3a78ae443a851dbc40a57c99a9a235edba7d3d3 100644 --- a/form_billing.py +++ b/form_billing.py @@ -43,7 +43,7 @@ def load(e: me.LoadEvent): @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/form_billing", on_load=load, diff --git a/form_profile.py b/form_profile.py index 2fdd44826d6c10610a4c2059f598b748f3cb4ea9..7ad257804d101294a226e355921b2eb94a4f7d3f 100644 --- a/form_profile.py +++ b/form_profile.py @@ -27,7 +27,7 @@ class State: @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/form_profile", on_load=load, diff --git a/grid_table.py b/grid_table.py index 8a55b6cfbb1c5b7beeecad8184daf23171e016bd..e033897d2b456e6f1c664e1d8d67a5279d7c4b80 100644 --- a/grid_table.py +++ b/grid_table.py @@ -64,7 +64,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/grid_table", ) diff --git a/headers.py b/headers.py index 751fe6fb6b5b72cb240f57f6ce3d1e4c2c0e7c35..dfddcdca31b0146323b4fc39045a5aaa1aa15b2d 100644 --- a/headers.py +++ b/headers.py @@ -10,7 +10,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/headers", ) diff --git a/html_demo.py b/html_demo.py index a416591c533425e0bbf6a741654c2f3ec8dd087a..2ff6786a717b1322c22b809a126dbea5b28fc63d 100644 --- a/html_demo.py +++ b/html_demo.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/html_demo", ) diff --git a/icon.py b/icon.py index fca4ce263a5b3fb372dfdf8cca7cb8bf8f73b9d4..d1a9797e077b5d16b82e21c79eda8301f3b455be 100644 --- a/icon.py +++ b/icon.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/icon", ) diff --git a/image.py b/image.py index c2e099bcf1b92be04cfe97866c48e0807bb2ec5c..ad5374411ea0bf59690f86b19b419a3fd997e9aa 100644 --- a/image.py +++ b/image.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/image", ) diff --git a/input.py b/input.py index 5c61b555ad2fc4cbdc9c08b003e0afec7be9f8d2..ef859473ecb8c2505aed64e5f8137a919b406128 100644 --- a/input.py +++ b/input.py @@ -18,7 +18,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/input", ) diff --git a/link.py b/link.py index 7f58d3fb9484c43a6cbf59b3603adf96d1ad5e9b..ccac8b88881c67a3012beef6295d810cd5cdc324 100644 --- a/link.py +++ b/link.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/link", ) diff --git a/llm_playground.py b/llm_playground.py index 2eff15ee41e8cd41c41c3fbca3ce9c1e3b4e994d..830409112dbbb408591c7affdb7e328a59c9c949 100644 --- a/llm_playground.py +++ b/llm_playground.py @@ -42,7 +42,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/llm_playground", title="LLM Playground", diff --git a/llm_rewriter.py b/llm_rewriter.py index 2b328e8a29ca471c7d3c6a5e45185bffa5430d15..6c4d3a0ef5688b777e9b3ca9fec221384740e9f1 100644 --- a/llm_rewriter.py +++ b/llm_rewriter.py @@ -36,7 +36,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/llm_rewriter", title="LLM Rewriter", diff --git a/main.py b/main.py index 9a2bc62a766d7f2a8d0251c74a8c9052f47e0ac3..a94c02cb2f5b07bbb7f29210b4d42b0a72ab507f 100644 --- a/main.py +++ b/main.py @@ -308,7 +308,7 @@ def load_home_page(e: me.LoadEvent): @me.page( title="Mesop Demos", security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), on_load=load_home_page, ) @@ -428,7 +428,7 @@ def create_main_fn(example: Example): title="Mesop Demos", path="/embed/" + example.name, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), ) def main(): diff --git a/markdown_demo.py b/markdown_demo.py index fed912a8359c8c6b7f8b259fffefb63043fa2bc7..e8025ceb171872e5ccff918b2696f6971d488dd9 100644 --- a/markdown_demo.py +++ b/markdown_demo.py @@ -74,7 +74,7 @@ def on_load(e: me.LoadEvent): @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/markdown_demo", on_load=on_load, diff --git a/markdown_editor.py b/markdown_editor.py index a1edfd3eb8d55c01e281da962f2e61e1d64602d2..ac146a7a445477da139324b973c7e113d55abc79 100644 --- a/markdown_editor.py +++ b/markdown_editor.py @@ -31,7 +31,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/markdown_editor", title="Markdown Editor", diff --git a/plot.py b/plot.py index 62fc20defdf03699b71614a809e20e2bb80fed63..d9530ab636e09831fa2a91f47b448b40bc2eaf93 100644 --- a/plot.py +++ b/plot.py @@ -10,7 +10,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/plot", ) diff --git a/progress_bar.py b/progress_bar.py index 6589451dcd845e46e2ff7f0a9a102b9cf2cf6484..8cd34e3cfa181c6a311c839c529e9ec2a84fcbe3 100644 --- a/progress_bar.py +++ b/progress_bar.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/progress_bar", ) diff --git a/progress_spinner.py b/progress_spinner.py index de4a82376781f2606d792e21b48ff01a75f032cb..158e517a657c81062e6151c95925d355f4c3b9b3 100644 --- a/progress_spinner.py +++ b/progress_spinner.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/progress_spinner", ) diff --git a/radio.py b/radio.py index d0519c0d72c66a8fbb66c1f354751a61c9367a83..de3aadd04fba6026dbdb5170f4184a4dfeea0b86 100644 --- a/radio.py +++ b/radio.py @@ -18,7 +18,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/radio", ) diff --git a/requirements.txt b/requirements.txt index ad4f4db8f6dc5f3c7d4505b53191075fddd58e8f..d5fe635fdf36e2e9154264475828f43dff5cf6a2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -mesop>=1.0.0rc2 +mesop==1.2.7 Flask==3.0.0 gunicorn==22.0.0 Werkzeug==3.0.6 diff --git a/select_demo.py b/select_demo.py index 0dc965a465e3c7a477f29a8becd3b8cc26a83913..16b11bb0fcdb729d36f5bcb1bc56f29447cbcfec 100644 --- a/select_demo.py +++ b/select_demo.py @@ -28,7 +28,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/select_demo", ) diff --git a/sidenav.py b/sidenav.py index ba3d1beb50fd0e7d877f8ee9aa77177effb0f7fd..c5ffbfd19a79f5c240dffed8bd9ff11c3eb980fd 100644 --- a/sidenav.py +++ b/sidenav.py @@ -25,7 +25,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/sidenav", ) diff --git a/slide_toggle.py b/slide_toggle.py index 46a42786e6355c491fe5b97a856b6903ed282c86..a89742e2a339eb88cfd3a898c6ee705e5832e63e 100644 --- a/slide_toggle.py +++ b/slide_toggle.py @@ -18,7 +18,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/slide_toggle", ) diff --git a/slider.py b/slider.py index 29be94e96c1e0479ae819e91b89fbcd2a1ec46c3..ff360c40877a1785e043de2d05cbefe6d624e23f 100644 --- a/slider.py +++ b/slider.py @@ -15,7 +15,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/slider", ) diff --git a/snackbar.py b/snackbar.py index 5adf344ef2c40109da1a5422f71ce3d3aa55529c..74f9c1e8cc55c780ab723b4fd3dea0be11ed6239 100644 --- a/snackbar.py +++ b/snackbar.py @@ -21,7 +21,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/snackbar", ) diff --git a/tab_group.py b/tab_group.py index bda03950069c9691edd05813e0aabd4298471b41..1e19a1a71122b07f613fee3ff6ca7afc258e3cbf 100644 --- a/tab_group.py +++ b/tab_group.py @@ -32,7 +32,7 @@ class State: @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/tab_group", ) diff --git a/table.py b/table.py index 5fcd53a5206858aeee5426d46dca391a3966a3d0..c85ca650bb04d2623964ddc69475e363501a6f02 100644 --- a/table.py +++ b/table.py @@ -35,7 +35,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/table", ) diff --git a/tailwind.py b/tailwind.py index eeccbc53967aa483b65c170aecd0e93719e497fd..23ba79cac3d47eb3b8a0b2782dc5341189e241fd 100644 --- a/tailwind.py +++ b/tailwind.py @@ -88,7 +88,7 @@ import mesop as me @me.page( security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), stylesheets=["/static/tailwind.css"], path="/tailwind", diff --git a/text.py b/text.py index 6313c01c6814fd45ecfc0afee180779df710d0c4..63edba4549a69e6971ac15bb612a0ebbe39f8323 100644 --- a/text.py +++ b/text.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/text", ) diff --git a/text_to_image.py b/text_to_image.py index 1222c0b9540631578d3322a752a66c6df1e25fe8..fcece3e329df2035c7c8afd1190219a99e3fa6c3 100644 --- a/text_to_image.py +++ b/text_to_image.py @@ -9,7 +9,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/text_to_image", title="Text to Image Example", diff --git a/text_to_text.py b/text_to_text.py index 01b3aaf7bc311f0192d99356e35e7ce68cd469b2..f1fd5918a564f4eb20d2004601a3bac12fe00d44 100644 --- a/text_to_text.py +++ b/text_to_text.py @@ -9,7 +9,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/text_to_text", title="Text to Text Example", diff --git a/textarea.py b/textarea.py index 59a2479c9a3bf89fd75ea303a126ad638219757a..ac2159a2f19c5e38626ec52a63fb1560c9e3dddf 100644 --- a/textarea.py +++ b/textarea.py @@ -37,7 +37,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/textarea", ) diff --git a/tooltip.py b/tooltip.py index 071f927cc47a15272f4436360294ae049a3ee9d3..a78728e61cdf6d1ee39eb92a8ab8018f5071a1ca 100644 --- a/tooltip.py +++ b/tooltip.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/tooltip", ) diff --git a/uploader.py b/uploader.py index df05d72e1056c1d3a0096461bcb1d5d2b15b858d..2e22603a71e583cbbcbba6ffc4daa08abdbb8265 100644 --- a/uploader.py +++ b/uploader.py @@ -15,7 +15,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/uploader", ) diff --git a/video.py b/video.py index b791f0ba38f5d693293e0d27c4b79a7acf10693c..e9f99dcb5ecf6c6341c264cc5497f796b0d5fa2d 100644 --- a/video.py +++ b/video.py @@ -8,7 +8,7 @@ def load(e: me.LoadEvent): @me.page( on_load=load, security_policy=me.SecurityPolicy( - allowed_iframe_parents=["https://mesop-dev.github.io"] + allowed_iframe_parents=["https://mesop-dev.github.io", "https://huggingface.co"] ), path="/video", )