YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

๐Ÿ“š Book Translator v1 โ€“ by Malemsana

Ever wanted to read Sherlock Holmes or any classic bookโ€ฆ
but the language was so ancient it hurt your brain? ๐Ÿ˜ฉ๐Ÿ“–

This tool changes that.
Welcome to the Book Translator v1, a powerful tool that rewrites and translates books into simpler, modern, or native-language versions โ€” all powered by an LLM like Gemini.


โœจ Features

  • ๐Ÿ” Translate entire .epub or .txt books
  • ๐Ÿง  Convert Victorian/Old English to simple, readable English
  • ๐ŸŒ Works with multiple languages
  • โœ๏ธ Modify writing style as well as language (e.g., casual tone, academic tone)
  • ๐Ÿ“ฆ Output is saved as a clean .epub โ€“ ready to read on your favorite e-reader

๐Ÿงฐ Requirements

You can run this in Google Colab (recommended) or locally with Python 3.

pip install ebooklib langdetect tqdm
# plus either OpenAI or Gemini API packages:
pip install openai
# or for Gemini:
pip install google-generativeai

๐Ÿš€ How to Use (Colab Recommended)

๐ŸŸข Step-by-step (Colab):

  1. Open book_translator_colab.ipynb
  2. Upload your .epub or .pdffile when prompted
  3. Enter:
    • Your API key (Gemini or OpenAI)
    • Your source style or language (e.g., โ€œVictorian Englishโ€)
    • Your target style or language (e.g., โ€œSimple Englishโ€ or โ€œHindiโ€)
  4. Run all the cells โ€” the notebook:
    • Breaks your book into chunks
    • Sends each one to the LLM
    • Reassembles them into a translated .epub
  5. Download and enjoy your upgraded book ๐Ÿค“๐Ÿ“ฑ

๐Ÿง  Example Prompt

We send prompts like this to the model:

โ€œRewrite the following text into simple, modern English.
Make sure itโ€™s easy to understand, while keeping the original meaning.
Avoid old-fashioned vocabulary.โ€

This creates output thatโ€™s smooth and readable โ€” perfect for younger readers or second-language learners!


๐Ÿงช Example Result

Original:

โ€œTo James Mortimer, M.R.C.S., from his friends of the C.C.H.,โ€ was written on it...

Translated:

It said, โ€œTo James Mortimer, M.R.C.S., from his friends at the C.C.H.โ€...


๐Ÿ”ฎ Future Upgrades

  • ๐ŸŽจ Tone options like โ€œchild-friendlyโ€, โ€œdetective reportโ€, or โ€œchat-styleโ€
  • ๐Ÿ“– Upload multiple books
  • ๐Ÿ—ฃ๏ธ Convert to audio with text-to-speech
  • ๐ŸŒ Web UI version in the works

๐Ÿ‘‘ Author

Created with love by Malemsana ๐Ÿงช
This project was born from a desire to actually finish reading Sherlock Holmes without needing a dictionary.

Check out my profile: huggingface.co/Malemsana


โš–๏ธ License

MIT โ€“ use it, remix it, improve it. Give old books new life.


โญ If this tool helps you read, learn, or enjoy more books โ€” give it a star!

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support