Download microsoftexcel-tunnels/scripts/try_cloudflare.py from toto10/extensions: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/toto10/extensions/resolve/refs%2Fpr%2F3/microsoftexcel-tunnels/scripts/try_cloudflare.py
- Command line
-
hf download hf://toto10/extensions@refs/pr/3/microsoftexcel-tunnels/scripts/try_cloudflare.py
-
curl -L -o try_cloudflare.py https://huggingface.co/toto10/extensions/resolve/refs%2Fpr%2F3/microsoftexcel-tunnels/scripts/try_cloudflare.py
470 Bytes
| # credit to camenduru senpai | |
| from pycloudflared import try_cloudflare | |
| from modules.shared import cmd_opts | |
| from gradio import strings | |
| import os | |
| if cmd_opts.cloudflared: | |
| print("cloudflared detected, trying to connect...") | |
| port = cmd_opts.port if cmd_opts.port else 7860 | |
| tunnel_url = try_cloudflare(port=port, verbose=False) | |
| os.environ['webui_url'] = tunnel_url.tunnel | |
| strings.en["PUBLIC_SHARE_TRUE"] = f"Running on public URL: {tunnel_url.tunnel}" | |