Skip to main content

Add your description here

Project description

InstaPPT

InstaPPT is an AI-powered PowerPoint translation tool designed to preserve the original visual fidelity of your slides while providing high-quality translations.

Features

  • AI Translation: Uses advanced LLMs (like GPT-4, DeepSeek) for accurate, context-aware translation.
  • Visual Fidelity: Preserves fonts, colors, sizes, and layout.
  • Visual Comparison Report: Generates a side-by-side PDF report showing the original and translated slides as images, ensuring "what you see is what you get".
  • Smart Caching: Caches translation results to save costs and time on repeated runs.
  • Cross-Platform: Works on macOS (optimized) and Windows.

Prerequisites

  1. Python 3.10+
  2. LibreOffice: Required for converting PPTX to PDF.
    • macOS: brew install --cask libreoffice
    • Windows: Install from official website.
  3. Poppler: Required for the image-based visual comparison.
    • macOS: brew install poppler
    • Windows: Download binary and add to PATH.

Installation

pip install -r requirements.txt

Usage

CLI Usage (After Installation)

If you installed the package via pip, you can use the instappt command directly:

instappt --input input.pptx --output output_dir --lang English --config model_info.json

Development Usage

If you are running from source:

python main.py --input input.pptx --output output_dir --lang English

Using a Configuration File

Create a model_info.json file to configure your LLM settings:

{
    "translator": {
        "model": "gpt-4o",
        "api_key": "sk-...",
        "base_url": "https://api.openai.com/v1"
    }
}

Run with config:

python main.py --input input.pptx --output output_dir --lang English --config model_info.json

Force Re-translation (Disable Cache)

If you want to ignore the cache and force a fresh translation:

python main.py --input input.pptx --output output_dir --lang English --config model_info.json --no-cache

SDK Usage

You can also use InstaPPT as a Python library in your own projects.

from instappt.core import PPTTranslator
from instappt.models import SDKConfig, ModelConfig

# 1. Configure Models
config = SDKConfig(
    translator_config=ModelConfig(
        model="gpt-4o",
        api_key="sk-...",
        base_url="https://api.openai.com/v1"
    ),
    optimizer_config=ModelConfig(
        model="gpt-4o",
        api_key="sk-...",
        base_url="https://api.openai.com/v1"
    ),
    evaluator_config=ModelConfig(
        model="gpt-4o",
        api_key="sk-...",
        base_url="https://api.openai.com/v1"
    ),
    enable_cache=True # Set to False to disable caching
)

# 2. Initialize Translator
translator = PPTTranslator(config, concurrency=32)

# 3. Process PPTX
input_file = "presentation.pptx"
output_file = "presentation_translated.pptx"
target_language = "English"

translator.process_ppt(input_file, output_file, target_language)

# 4. Generate Reports (Optional)
translator.generate_reports(
    output_dir="output_folder",
    report_prefix="my_report_",
    original_pptx=input_file,
    translated_pptx=output_file
)

Output

The tool generates:

  1. Translated PPTX: [filename]_translated.pptx
  2. Visual Comparison: [filename]_comparison.pdf (Side-by-side images)
  3. Assessment Report: [filename]_assessment_report.pdf (Quality metrics)

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

All files are saved in the specified output directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

instappt-0.0.1.tar.gz (112.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

instappt-0.0.1-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file instappt-0.0.1.tar.gz.

File metadata

  • Download URL: instappt-0.0.1.tar.gz
  • Upload date:
  • Size: 112.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for instappt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f29c88bc5294e7704b7aa416ff4b277168416bc66d496a85d237079109328277
MD5 0756fee3c768ba9a30f93b09d8f4f5be
BLAKE2b-256 cdea02a5b1443835de23e51f0fa8553dbd7b456417ffe93e9bd2dc63245ef409

See more details on using hashes here.

File details

Details for the file instappt-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: instappt-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for instappt-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07b5c3e596456e0faac20e552b6186526caa48a9bbb0e478686d21bec90f1739
MD5 f12a716486372577cc95d3432f073c8f
BLAKE2b-256 03251856f82d769bbf4ee91c02692e35472a166639122410fb0d9b04211d02f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page