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

Release as a package/library? #37

Open
chen-rn opened this issue Jun 17, 2023 · 5 comments
Open

Release as a package/library? #37

chen-rn opened this issue Jun 17, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@chen-rn
Copy link

chen-rn commented Jun 17, 2023

I think this is the best library I've found for using GPT to do subtitle translation! Great job.
A lot of that issues that I ran into while trying to use gpt4 to do translation for subs has been solved(mainly the sync and batching issue).

I'll likely copy the core code from this repo for my own project, but it would be amazing to have a library that I can simply import and update when this package updates(especially given how fast the GPT apis are changing)!

Anyhow, just throwing this out there :) I know you probably got a lot on your plate! Thanks for the great contribution!

@machinewrapped
Copy link
Owner

Thanks, glad to hear it's been useful!

The PySubtitleGPT folder should be usable as a library, that's basically how the project started life and it contains all the core functionality. It would be good to package it without the GUI or the CLI, but I don't know what the best approach would be. Do you know if there's a way to publish a specific subfolder on PyPi, or something?

I guess forking the repository and deleting the GUI & top-level scripts might work too, though that's probably not how these things are supposed to be done 😅 If you feel like creating/maintaining a library fork then please do so with my blessing though!

@chen-rn
Copy link
Author

chen-rn commented Jun 17, 2023

Yea! The project is well organized, to the point where I can just copy the PySubtitleGPT folder and start using the SubtitleProject class.

I don't know what the best approach would be. Do you know if there's a way to publish a specific subfolder on PyPi, or something?

I would imagine the best way would be to have two separate repos(like what you said), one for the GUI and one for the Library. Your GUI would simply import the Library like how other projects would!

I'm not too familiar publishing Python libraries either but I don't think it'd be too difficult given how well organized the code is atm. I'm sure someone who is more familiar with that will pick up the task in the near future as this seems to be the best gpt-subtitle library! Maybe you can add a "roadmap/contribution.md" in the README for others to pick up:)

@zh-plus
Copy link

zh-plus commented Jun 20, 2023

Perhaps you can use poetry to package your work to pypi. Just put PySubtitleGPT in the packages section, like this: packages = [{include = "PySubtitleGPT"}].

By the way, I am currently working on a project called openlrc that converts speech to text and translates it. Your prompt has given me a lot of inspiration. Great job!

@machinewrapped
Copy link
Owner

Thanks, Poetry looks promising, I'll investigate it in more detail.

That's great that you're working on a project - good luck with it - and I'm happy to have been inspiring! I'm really excited by the potential of this new generation of AI models, and can't wait to see where things go from here!

@machinewrapped machinewrapped added the help wanted Extra attention is needed label Jun 9, 2024
@machinewrapped
Copy link
Owner

I still think this is a good idea, even though the issue is nearly 12 months old and I still haven't done it! If anybody who has Poetry experience would like to tackle it, it would be appreciated - it can probably be done without separating the core library and the GUI into different projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants