Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,6 +48,7 @@ def main():
|
|
48 |
|
49 |
if st.button("Organize Videos"):
|
50 |
organized_doc = organize_videos(playlist_url, repetitive_terms)
|
|
|
51 |
st.markdown(get_download_link(organized_doc), unsafe_allow_html=True)
|
52 |
display_organized_videos(organized_doc)
|
53 |
|
@@ -133,8 +134,10 @@ def organize_videos(playlist_url, repetitive_terms):
|
|
133 |
return doc
|
134 |
|
135 |
def get_download_link(doc):
|
136 |
-
|
137 |
-
|
|
|
|
|
138 |
return doc_download_link
|
139 |
|
140 |
def display_organized_videos(doc):
|
|
|
48 |
|
49 |
if st.button("Organize Videos"):
|
50 |
organized_doc = organize_videos(playlist_url, repetitive_terms)
|
51 |
+
# Provide a download link for the generated document
|
52 |
st.markdown(get_download_link(organized_doc), unsafe_allow_html=True)
|
53 |
display_organized_videos(organized_doc)
|
54 |
|
|
|
134 |
return doc
|
135 |
|
136 |
def get_download_link(doc):
|
137 |
+
# Save the document to a specific directory
|
138 |
+
doc.save("/app/documents/organized_videos.docx")
|
139 |
+
# Provide a download link for the document
|
140 |
+
doc_download_link = f'<a href="/app/documents/organized_videos.docx" download>Click here to download the organized videos document</a>'
|
141 |
return doc_download_link
|
142 |
|
143 |
def display_organized_videos(doc):
|