mshumer / gpt-author

MIT License
2.45k stars 354 forks source link

Different Language? #5

Open snip3r009 opened 1 year ago

snip3r009 commented 1 year ago

I find it very beautiful what you have created, is it also possible to create stories in other languages like Dutch? If so, how can I do this? Thank you very much.

mshumer commented 1 year ago

Thanks! You can modify each of the prompts to ask them to write in Dutch.

snip3r009 commented 1 year ago

Hi, thnxz for the swift reply. I did that, but it generates only one chapter in Dutch, the rest in English

dsandua commented 1 year ago
# Set metadata
book.set_identifier('id123456')
book.set_title(title)
**book.set_language('nl')**
book.add_author(author)
snip3r009 commented 1 year ago
# Set metadata
book.set_identifier('id123456')
book.set_title(title)
**book.set_language('nl')**
book.add_author(author)

Hi Dsandua, I did that also, in the metadata i changed it to NL i am testing now that i change all the prompts into Dutch, maybe that will help, thanx for your advise

AgimaFR commented 1 year ago
# Set metadata
book.set_identifier('id123456')
book.set_title(title)
**book.set_language('nl')**
book.add_author(author)

EbookLib library itself is not capable of translating text. It's a library for handling e-books, not for translating text. The function book.set_language('nl') simply allows you to define a metadata for the book, as with the author... There's no choice but to go through googletrans, for example, to translate the content that will then be sent to EbookLib.

snip3r009 commented 1 year ago

I allready found a way to translate the text. 1st i convert the epub to pdf, then i go to https://www.deepl.com/translator/files ad the entire pdf will be translated, after that i change it back to epub translation is good

AgimaFR commented 1 year ago

@snip3r009 Using the DeepL API?

snip3r009 commented 1 year ago

No, i simple convert the epub to pdf, then i go to https://www.deepl.com/translator/files and upload the pdf and let Deepl translate it for me. I dont know if it will work with Deepl api

AgimaFR commented 1 year ago

DeepL API

It works manually of course, but it would be better on automatic like the reste of the eBook 😉

At the moment, I'm working on improving the content of the chapters, which I find rather poor. Then I'll come back to the translation part, which is a detail if the quality of the book isn't there.

snip3r009 commented 1 year ago

Yes, you are right, the chapter content is too brief and limited; it should have more substance. You can easily finish reading a chapter in no time at all. If it was chatgpt-4, then it can create more chapters and more content, i think