Skip to content

Commit

Permalink
Add a button to download the exported subtitle file
Browse files Browse the repository at this point in the history
  • Loading branch information
LostXine committed Jul 18, 2023
1 parent cf63887 commit 468d20b
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 468d20b

Please sign in to comment.