Skip to content

Commit

Permalink
Merge pull request #51 from LostXine/download_btn
Browse files Browse the repository at this point in the history
Add download button to download the exported subtitle file
  • Loading branch information
abdeladim-s committed Jul 18, 2023
2 parents cf63887 + 468d20b commit 443aba0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/subsai/webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ def webui() -> None:
exported_file = media_file.parent / (export_filename + export_format)
subs.save(exported_file, fps=fps)
st.success(f'Exported file at {exported_file}', icon="✅")
with open(exported_file, 'r') as f:
st.download_button('Download', f, file_name=export_filename + export_format)

st.markdown(footer, unsafe_allow_html=True)

Expand Down

0 comments on commit 443aba0

Please sign in to comment.