Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import streamlit as st
|
| 3 |
import subprocess
|
|
|
|
| 4 |
def install_libraries():
|
| 5 |
try:
|
| 6 |
subprocess.check_call(['pip', 'install', 'pytube'])
|
|
@@ -9,14 +9,17 @@ def install_libraries():
|
|
| 9 |
except subprocess.CalledProcessError as e:
|
| 10 |
print("Error during installation:", e)
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
# Title
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
url = st.text_input("Enter YouTube Video URL")
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
import subprocess
|
| 3 |
+
|
| 4 |
def install_libraries():
|
| 5 |
try:
|
| 6 |
subprocess.check_call(['pip', 'install', 'pytube'])
|
|
|
|
| 9 |
except subprocess.CalledProcessError as e:
|
| 10 |
print("Error during installation:", e)
|
| 11 |
|
| 12 |
+
|
| 13 |
+
install_libraries()
|
| 14 |
+
import functions
|
| 15 |
# Title
|
| 16 |
+
|
| 17 |
+
st.title("Translate YouTube Video to French")
|
| 18 |
+
|
| 19 |
url = st.text_input("Enter YouTube Video URL")
|
| 20 |
+
if url:
|
| 21 |
+
captions = functions.download_video_transcript(url)
|
| 22 |
+
if captions:
|
| 23 |
+
st.write(captions)
|
| 24 |
+
else:
|
| 25 |
+
st.write("Provided URL did not contain captions")
|