Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload and download via webui? #49

Closed
LostXine opened this issue Jul 17, 2023 · 7 comments
Closed

Upload and download via webui? #49

LostXine opened this issue Jul 17, 2023 · 7 comments

Comments

@LostXine
Copy link
Contributor

Hello,

Thank you for your great work which saves me a lot of time and effort. Please forgive me if I didn't get it correctly, is there a way to upload video/audio files and download sub files via the webui? I think it will make this project easier to use if we can upload and download files directly on webui.

I found the following links to streamlit docs might be helpful:
How do you retrieve the filename of a file uploaded with st.file_uploader?
How to download a file in Streamlit?

Thanks again,
Best,

@abdeladim-s
Copy link
Owner

Hello @LostXine,

You are welcome.
Glad it is being useful for you.

What you asked for is exactly what the webui is built for, actually you don't even need to upload any file, just the absolute path of a media file in your system is enough, next you tune the parameters, you hit transcribe and you export your subtitles file, as easy as that!

Have you tried the webui and found any issues with that ?

@LostXine
Copy link
Contributor Author

Hi @abdeladim-s

Thank you so much for your reply. Sorry, I didn't make my question clear. I'm running subsai on a remote GPU server and all my audio files are on my local machine. Please correct me if I got it wrong, in such config I have to upload the audio file to the remote server and fetch the subs file manually, which also means using another tool. So I wonder if I could do all file transferring through webui.

Thanks,

@abdeladim-s
Copy link
Owner

No problem @LostXine, I got your point now.

  • The webui is developed to be running on a local machine: at first, I wanted to use that streamlit file uploader, but I found an issue that it returns just a bytes object instead of a path (btw this is still an open issue in the streamlit repo) so I decided to use a simple text for the path because it will be used locally anyways.
    So yeah, it won't work if you are using a remote server .. I might develop a workaround for you if you want but I am not sure f it will work ?

  • Regrading fetching the subs, the export button should work from the remote server without any issues, because it is a download button. So the subtitles file should get downloaded to your local machine I think ? isn't it the case ?

@LostXine
Copy link
Contributor Author

Thanks for your detailed explanation.

  • For the upload, that will be great, and please take your time! I will also take this chance to look into it.
  • Unfortunately, the download does not work as you described. But it can be fixed easily and I will submit a PR very soon.

Thank you so much for your help, have a great one!

abdeladim-s added a commit that referenced this issue Jul 18, 2023
@abdeladim-s
Copy link
Owner

  • Here you go @LostXine, I have added this upload feature. You can now choose to use a local path or to upload your files.
    Please update the package and give it a try.
  • Your PR has been merged as well, the download button works perfectly. Thanks!

Let me know if you need any other help ?

@LostXine
Copy link
Contributor Author

Sorry for the late reply, I'll take a look.
Thank you so much!

@abdeladim-s
Copy link
Owner

No problem @LostXine.
Take your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants