lainlives commited on
Commit
ec4f1d8
·
verified ·
1 Parent(s): a642638

Delete urv/notebooks/ultimate_rvc_colab.ipynb

Browse files
urv/notebooks/ultimate_rvc_colab.ipynb DELETED
@@ -1,165 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "markdown",
5
- "metadata": {
6
- "id": "kmyCzJVyCymN"
7
- },
8
- "source": [
9
- "Colab for [Ultimate RVC](https://github.com/JackismyShephard/ultimate-rvc)\n",
10
- "\n",
11
- "This Colab notebook will **help** you if you don’t have a GPU or if your PC isn’t very powerful.\n",
12
- "\n",
13
- "Simply click `Runtime` in the top navigation bar and `Run all`. Wait for the output of the final cell to show the public gradio url and click on it.\n",
14
- "\n",
15
- "NOTE: If Ultimate RVC is running too slowly with the default sharing method (gradio), consider instead selecting \"ngrok\" as sharing method. \n",
16
- "This method requires supplying an access token, which you can find on [ngrok](https://ngrok.com/) after creating a personal account.\n",
17
- "The ngrok link output in the final cell will lead you to a new site which will redirect you to Ultimate RVC."
18
- ]
19
- },
20
- {
21
- "cell_type": "code",
22
- "execution_count": null,
23
- "metadata": {},
24
- "outputs": [],
25
- "source": [
26
- "# @title 0: Initialize notebook\n",
27
- "%pip install ipython-autotime pyngrok\n",
28
- "%load_ext autotime\n",
29
- "\n",
30
- "import codecs\n",
31
- "import os\n",
32
- "import time\n",
33
- "from pathlib import Path\n",
34
- "from urllib import request\n",
35
- "\n",
36
- "import ipywidgets as widgets\n",
37
- "from IPython.display import clear_output\n",
38
- "from IPython.display import display as i_display\n",
39
- "from pyngrok import ngrok\n",
40
- "\n",
41
- "clear_output()"
42
- ]
43
- },
44
- {
45
- "cell_type": "code",
46
- "execution_count": null,
47
- "metadata": {
48
- "cellView": "form",
49
- "id": "aaokDv1VzpAX"
50
- },
51
- "outputs": [],
52
- "source": [
53
- "# @title 1: Clone repository\n",
54
- "cloneing = codecs.decode(\n",
55
- " \"uggcf://tvguho.pbz/WnpxvfzlFurcuneq/hygvzngr-eip.tvg\",\n",
56
- " \"rot_13\",\n",
57
- ")\n",
58
- "\n",
59
- "!git clone $cloneing HRVC\n",
60
- "%cd /content/HRVC\n",
61
- "clear_output()"
62
- ]
63
- },
64
- {
65
- "cell_type": "code",
66
- "execution_count": null,
67
- "metadata": {
68
- "cellView": "form",
69
- "id": "lVGNygIa0F_1"
70
- },
71
- "outputs": [],
72
- "source": [
73
- "# @title 2: Install dependencies\n",
74
- "\n",
75
- "light = codecs.decode(\"uggcf://nfgeny.fu/hi/0.9.11/vafgnyy.fu\", \"rot_13\")\n",
76
- "inits = codecs.decode(\"./fep/hygvzngr_eip/pber/znva.cl\", \"rot_13\")\n",
77
- "prerelease = \"--prerelease if-necessary-or-explicit\"\n",
78
- "\n",
79
- "!apt install -y python3-dev unzip\n",
80
- "!curl -LsSf $light | sh\n",
81
- "\n",
82
- "os.environ[\"URVC_CONSOLE_LOG_LEVEL\"] = \"WARNING\"\n",
83
- "\n",
84
- "!uv run -q $prerelease $inits\n",
85
- "!uv add $prerelease matplotlib-inline==0.1.7\n",
86
- "clear_output()"
87
- ]
88
- },
89
- {
90
- "cell_type": "code",
91
- "execution_count": null,
92
- "metadata": {
93
- "cellView": "form",
94
- "id": "lVGNygIa0F_2"
95
- },
96
- "outputs": [],
97
- "source": [
98
- "# @title 3: Run Ultimate RVC\n",
99
- "# @markdown #### Choose a sharing method:\n",
100
- "\n",
101
- "method = \"gradio\" # @param [\"gradio\", \"ngrok\", \"cloudflared\",\"localtunnel\"]\n",
102
- "ngrok_token = \"\" # @param {type:\"string\"}\n",
103
- "runpice = codecs.decode(\"./fep/hygvzngr_eip/jro/znva.cl\", \"rot_13\")\n",
104
- "\n",
105
- "if method == \"gradio\":\n",
106
- " !uv run $prerelease $runpice --share\n",
107
- "elif method == \"ngrok\":\n",
108
- " try:\n",
109
- " ngrok.set_auth_token(ngrok_token)\n",
110
- " ngrok.kill()\n",
111
- " tunnel = ngrok.connect(6969)\n",
112
- " print(f\"Ngrok URL: {tunnel.public_url}\")\n",
113
- " !uv run $prerelease $runpice --listen-port 6969\n",
114
- " except Exception as e: # noqa: BLE001\n",
115
- " print(f\"Error starting ngrok: {e}\")\n",
116
- "elif method == \"cloudflared\":\n",
117
- " !curl -LO https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb\n",
118
- " !dpkg -i cloudflared-linux-amd64.deb\n",
119
- " clear_output()\n",
120
- " !rm -rf nohup.out\n",
121
- " !nohup cloudflared tunnel --url localhost:6969 &\n",
122
- " clear_output()\n",
123
- " time.sleep(10)\n",
124
- " cloudflare_url = !grep -oE \"https://[a-zA-Z0-9.-]+\\.trycloudflare\\.com\" nohup.out\n",
125
- " print(f\"URVC Public URL: {cloudflare_url}\")\n",
126
- " !uv run $prerelease $runpice --listen-port 6969\n",
127
- "elif method == \"localtunnel\":\n",
128
- " !npm install -g localtunnel &>/dev/null\n",
129
- " Path(\"url.txt\").open(\"w\", encoding=\"utf-8\").close()\n",
130
- " !lt --port 6969 >> url.txt 2>&1 &\n",
131
- " time.sleep(2)\n",
132
- " endpoint_ip = (\n",
133
- " request.urlopen(\"https://ipv4.icanhazip.com\").read().decode(\"utf8\").strip(\"\\n\")\n",
134
- " )\n",
135
- " tunnel_url = (\n",
136
- " Path(\"url.txt\").read_text(encoding=\"utf-8\").replace(\"your url is: \", \"\")\n",
137
- " )\n",
138
- " print(f\"Share Link: {tunnel_url}\")\n",
139
- " password_endpoint_widget = widgets.Text(\n",
140
- " value=endpoint_ip,\n",
141
- " description=\"Password IP:\",\n",
142
- " disabled=True,\n",
143
- " )\n",
144
- " i_display(password_endpoint_widget)\n",
145
- " !uv run $prerelease $runpice --listen-port 6969"
146
- ]
147
- }
148
- ],
149
- "metadata": {
150
- "accelerator": "GPU",
151
- "colab": {
152
- "gpuType": "T4",
153
- "provenance": []
154
- },
155
- "kernelspec": {
156
- "display_name": "Python 3",
157
- "name": "python3"
158
- },
159
- "language_info": {
160
- "name": "python"
161
- }
162
- },
163
- "nbformat": 4,
164
- "nbformat_minor": 0
165
- }