Spaces:
Runtime error
Runtime error
danilotpnta
commited on
Commit
·
27e0392
1
Parent(s):
a0d193f
update
Browse files- app.py +14 -0
- download_video.py +2 -2
app.py
CHANGED
@@ -1,3 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import whisper
|
2 |
import gradio as gr
|
3 |
import os
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
# Install Chrome and dependencies
|
4 |
+
os.system("apt-get update")
|
5 |
+
os.system("apt-get install -y wget unzip")
|
6 |
+
os.system("wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb")
|
7 |
+
os.system("apt install -y ./google-chrome-stable_current_amd64.deb")
|
8 |
+
|
9 |
+
# Set ChromeDriver path in the environment
|
10 |
+
os.system("wget -N https://chromedriver.storage.googleapis.com/128.0.6613.137/chromedriver_linux64.zip -P /tmp/")
|
11 |
+
os.system("unzip /tmp/chromedriver_linux64.zip -d /tmp/")
|
12 |
+
os.system("mv /tmp/chromedriver /usr/local/bin/chromedriver")
|
13 |
+
os.system("chmod +x /usr/local/bin/chromedriver")
|
14 |
+
|
15 |
import whisper
|
16 |
import gradio as gr
|
17 |
import os
|
download_video.py
CHANGED
@@ -5,6 +5,7 @@ from selenium.webdriver.support.ui import WebDriverWait
|
|
5 |
from selenium.webdriver.support import expected_conditions as EC
|
6 |
from selenium.webdriver.chrome.service import Service
|
7 |
from webdriver_manager.chrome import ChromeDriverManager
|
|
|
8 |
import requests
|
9 |
|
10 |
def download_mp3_selenium(youtube_url):
|
@@ -17,8 +18,7 @@ def download_mp3_selenium(youtube_url):
|
|
17 |
# Use WebDriverManager to handle the ChromeDriver version
|
18 |
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
|
19 |
|
20 |
-
|
21 |
-
driver = webdriver.Chrome(options=options)
|
22 |
|
23 |
# Set up WebDriverWait (with a timeout of 10 seconds)
|
24 |
wait = WebDriverWait(driver, 10)
|
|
|
5 |
from selenium.webdriver.support import expected_conditions as EC
|
6 |
from selenium.webdriver.chrome.service import Service
|
7 |
from webdriver_manager.chrome import ChromeDriverManager
|
8 |
+
|
9 |
import requests
|
10 |
|
11 |
def download_mp3_selenium(youtube_url):
|
|
|
18 |
# Use WebDriverManager to handle the ChromeDriver version
|
19 |
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
|
20 |
|
21 |
+
# driver = webdriver.Chrome(options=options)
|
|
|
22 |
|
23 |
# Set up WebDriverWait (with a timeout of 10 seconds)
|
24 |
wait = WebDriverWait(driver, 10)
|