Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def main():
|
|
| 27 |
url = st.text_input("Enter YouTube Video URL")
|
| 28 |
|
| 29 |
if url:
|
| 30 |
-
captions, translated_captions, original_file, translated_file = Milestone5API.download_video_transcript(url)
|
| 31 |
|
| 32 |
if captions and translated_captions:
|
| 33 |
captions_list = []
|
|
@@ -41,7 +41,10 @@ def main():
|
|
| 41 |
df['Translated'] = trimmed_translated_captions
|
| 42 |
|
| 43 |
st.write(df[['Timestamp', 'Original','Translated']])
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
| 45 |
else:
|
| 46 |
st.write("Provided URL did not contain captions or translations")
|
| 47 |
|
|
|
|
| 27 |
url = st.text_input("Enter YouTube Video URL")
|
| 28 |
|
| 29 |
if url:
|
| 30 |
+
captions, translated_captions, original_file, translated_file, video_path = Milestone5API.download_video_transcript(url)
|
| 31 |
|
| 32 |
if captions and translated_captions:
|
| 33 |
captions_list = []
|
|
|
|
| 41 |
df['Translated'] = trimmed_translated_captions
|
| 42 |
|
| 43 |
st.write(df[['Timestamp', 'Original','Translated']])
|
| 44 |
+
if video_path:
|
| 45 |
+
st.video(video_path)
|
| 46 |
+
else:
|
| 47 |
+
st.write("No video found for the given URL")
|
| 48 |
else:
|
| 49 |
st.write("Provided URL did not contain captions or translations")
|
| 50 |
|