Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def install_and_download(url):
|
|
| 19 |
import pandas as pd
|
| 20 |
import Milestone5API
|
| 21 |
|
| 22 |
-
@st.
|
| 23 |
def download_transcripts(url):
|
| 24 |
return Milestone5API.download_video_transcript(url)
|
| 25 |
|
|
@@ -27,7 +27,9 @@ def install_and_download(url):
|
|
| 27 |
url = st.text_input("Enter YouTube Video URL")
|
| 28 |
|
| 29 |
if url:
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
|
| 32 |
if captions and translated_captions:
|
| 33 |
captions_list = []
|
|
|
|
| 19 |
import pandas as pd
|
| 20 |
import Milestone5API
|
| 21 |
|
| 22 |
+
@st.cache(allow_output_mutation=True)
|
| 23 |
def download_transcripts(url):
|
| 24 |
return Milestone5API.download_video_transcript(url)
|
| 25 |
|
|
|
|
| 27 |
url = st.text_input("Enter YouTube Video URL")
|
| 28 |
|
| 29 |
if url:
|
| 30 |
+
cached_data = download_transcripts(url)
|
| 31 |
+
|
| 32 |
+
captions, translated_captions, _, _ = cached_data
|
| 33 |
|
| 34 |
if captions and translated_captions:
|
| 35 |
captions_list = []
|