Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import subprocess
|
| 3 |
-
|
| 4 |
def install_libraries():
|
| 5 |
try:
|
| 6 |
subprocess.check_call(['pip', 'install', 'pytube'])
|
|
@@ -23,7 +23,7 @@ def main():
|
|
| 23 |
captions_list = [] # Initialize empty list for captions
|
| 24 |
|
| 25 |
if url:
|
| 26 |
-
captions = Milestone5API.download_video_transcript(url)
|
| 27 |
if captions:
|
| 28 |
# Parse captions from the API response
|
| 29 |
for line in captions.split("\n"):
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import subprocess
|
| 3 |
+
import sys
|
| 4 |
def install_libraries():
|
| 5 |
try:
|
| 6 |
subprocess.check_call(['pip', 'install', 'pytube'])
|
|
|
|
| 23 |
captions_list = [] # Initialize empty list for captions
|
| 24 |
|
| 25 |
if url:
|
| 26 |
+
captions, translated_captions, original_file, translated_file = Milestone5API.download_video_transcript(url)
|
| 27 |
if captions:
|
| 28 |
# Parse captions from the API response
|
| 29 |
for line in captions.split("\n"):
|