Last active
March 16, 2022 08:35
-
-
Save korakot/786afa149df91b08a20ff3034b5111ab to your computer and use it in GitHub Desktop.
Serve Colab webapp at a port as iframe and window (serve_port)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from google.colab.output import serve_kernel_port_as_iframe, serve_kernel_port_as_window | |
# start a simple server | |
get_ipython().system_raw("python3 -m http.server 8888 &") | |
serve_kernel_port_as_iframe(8888) | |
# path='/', | |
# width='100%', | |
# height='400', | |
# cache_in_notebook=False | |
serve_kernel_port_as_window(8888) # path='/', anchor_text=None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment