Skip to content

daqing/gpt-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT-Translator

Translate markdown files using OpenAI's GPT-4 model.

Usage

  1. First, clone the repo
git clone https://github.com/daqing/gpt-translator.git
  1. Set OPENAI_API_KEY environment variable
export OPENAI_API_KEY='sk-zPByWXXXXXXXXXXXXXXXXXXXXXXX'
  1. Run main.py
python main.py --base-lang en --target-lang zh-CN --input ./demo/example.en.md --output ./example.zh-CN.md

This will translate ./demo/example.en.md into simplified chinese and save to ./example.zh-CN.md.

Remember to set the OPENAI_API_KEY environment variable in order to use the GPT-4 model.

About

Translate markdown files using GPT-4 model

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages