Polyglot is a web-based code translator that allows you to convert your code from one programming language to another. It uses OpenAI's GPT-3 language model to perform the translations.
- Node.js (version 12.16 or higher)
- Angular CLI (version 12 or higher)
- OpenAI API key
-
Clone the repository:
git clone https://github.com/ranahaani/polyglot.git
-
Navigate to the project directory:
cd polyglot
-
Install the dependencies:
npm install
-
Create a file named
environments.ts
in thesrc/environments
directory with the following contents:export const environments = { production: false, openAIToken: 'your-openai-api-key' };
-
Replace
your-openai-api-key
with your OpenAI API key. -
Start the development server:
ng serve
- Select the input programming language from the dropdown menu.
- Write or paste your code in the first editor.
- Select the output programming language from the dropdown menu.
- Click the "Translate" button to convert your code.
- The translated code will appear in the second editor.
- Click the copy icon to copy the translated code to your clipboard.
- Fork the repository.
- Create a new branch:
git checkout -b new-feature
- Make your changes and commit them:
git commit -am 'Add new feature'
- Push to the branch:
git push origin new-feature
- Create a pull request.
Polyglot App is released under the MIT License. See LICENSE for details.