Buckets:
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "37332b51-33b6-42ee-8348-0d9b87049715", | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "http://r479.modal.host:33397\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "import modal\n", | |
| "import os\n", | |
| "import time\n", | |
| "local_port = 7860\n", | |
| "with modal.forward(local_port, unencrypted=True) as tunnel:\n", | |
| " hostname, remote_port = tunnel.tcp_socket\n", | |
| " url = f\"http://{hostname}:{remote_port}\"\n", | |
| " print(url)\n", | |
| " \n", | |
| " # 保持连接\n", | |
| " try:\n", | |
| " while True:\n", | |
| " time.sleep(1)\n", | |
| " except KeyboardInterrupt:\n", | |
| " pass" | |
| ] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python 3 (ipykernel)", | |
| "language": "python", | |
| "name": "python3" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.12.10" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } | |
Xet Storage Details
- Size:
- 1.23 kB
- Xet hash:
- 1815b9d4f97079f02cbf77204fe8bdff56aa6170bcba9d27d8af4590fd3d3bae
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.