Spaces:
Running
Running
Update model.py
Browse files
model.py
CHANGED
@@ -11,8 +11,19 @@ from pytubefix.cli import on_progress
|
|
11 |
from source_separation import Predictor
|
12 |
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
def download_from_youtube(url, folder_path):
|
15 |
-
yt = YouTube(
|
|
|
|
|
|
|
|
|
|
|
16 |
print(yt.title)
|
17 |
|
18 |
ys = yt.streams.get_highest_resolution()
|
|
|
11 |
from source_separation import Predictor
|
12 |
|
13 |
|
14 |
+
def token_verifier():
|
15 |
+
visitor_data = "CgtkTUVqS2hIcUR3SSjm-ee6BjIKCgJVUxIEGgAgIA%3D%3D"
|
16 |
+
po_token = "MnSwBAM1XYDp6bA8Z_JBCNCoNW8B0QpC-m_9mKWKsG5JWIjKIGCD2GZDzXXoz41VM9SGWki1uE1KmqxAu9rYVLoTChUn_wlHYvQ5GMmpZLtF1sbo5zeWzhSALHMSrjxIhGV5-xPF3QfwVU-TbY8MUGZKXvSlRA=="
|
17 |
+
return (visitor_data, po_token)
|
18 |
+
|
19 |
+
|
20 |
def download_from_youtube(url, folder_path):
|
21 |
+
yt = YouTube(
|
22 |
+
url,
|
23 |
+
on_progress_callback=on_progress,
|
24 |
+
use_po_token=True,
|
25 |
+
po_token_verifier=token_verifier,
|
26 |
+
)
|
27 |
print(yt.title)
|
28 |
|
29 |
ys = yt.streams.get_highest_resolution()
|