GithubHelp home page GithubHelp logo

sidejob-omni_translator's Introduction

Sidejob-omni_Translator

The script utilizes GPT-4o's vision capabilities to translate and convert PDF files into LaTeX format, offering a distinct advantage over traditional methods that require text extraction. By processing each page as an image, it interprets both text and graphical data, translating content into English and recreating tables from visuals. This method bypasses common issues associated with text extraction, ensuring accurate replication of the original document's layout and content in LaTeX format. Textual content is directly converted into LaTeX, while placeholders are inserted for non-table images. The output is ready for immediate use in platforms like Overleaf, making the original PDF's content fully editable and accessible.

How to Use

  1. Clone the repository:

    git clone https://github.com/amin-jalilzadeh-tu/Sidejob-omni_Translotor.git
    cd Sidejob-omni_Translotor
  2. Install the required packages:

    pip install -r requirements.txt
  3. Run the Streamlit app:

    streamlit run streamlit_app.py
  4. Open your web browser and go to http://localhost:8501.

  5. Upload a PDF file, enter your OpenAI API key (you can get it from OpenAI Platform), specify the output path for the LaTeX file, and click "Process PDF".

  6. The LaTeX file will be generated at the specified location. The output is ready to be used in Overleaf, and your file will be translated with tables generated and replicated from the PDF file.

Project Structure

  • streamlit_app.py: Contains the Streamlit UI code.
  • pdf_processor.py: Contains the PDF processing and translation logic.
  • requirements.txt: Lists the required Python packages.

Example PDF Files

Three example files are included in this repository for testing purposes:

  • Example_Dutch_file.pdf: Example PDF file in Dutch for testing.
  • Example_Translated_Latex.pdf: Example of the translated LaTeX output from Overleaf.
  • translated_document.tex: LaTeX file generated from the Dutch PDF file, ready for use in Overleaf.

Video Demonstration

Check out this video demonstration to see how the project works in action:

Watch the video demonstration here

sidejob-omni_translator's People

Contributors

amin-jalilzadeh-tu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.