Skip to content

Latest commit

Β 

History

History
47 lines (32 loc) Β· 1.41 KB

File metadata and controls

47 lines (32 loc) Β· 1.41 KB

πŸš€ AI Code Generator

AI Code Generator is a modern, web-based tool that leverages OpenAI's GPT models to generate clean, executable code, unit tests, and documentation across multiple programming languages. Built with FastAPI for the backend and Gradio for the frontend, it provides developers with a seamless, interactive, and visually appealing coding assistant.


🌟 Features

  • Generate production-ready code in multiple languages: Python, JavaScript, Java, HTML, C++, Go, TypeScript, PHP, Ruby, Swift.
  • Automatically generate unit tests for your code.
  • Generate documentation for classes and functions.
  • Copy code to the clipboard or save it directly to a file.
  • Clean, modern, and responsive UI with custom CSS.
  • Works locally or can be deployed to cloud servers.

πŸ› οΈ Tech Stack

  • Backend: FastAPI
  • Frontend: Gradio
  • AI: OpenAI GPT (via openai Python library)
  • Clipboard Support: Pyperclip
  • Environment Variables: .env file for OpenAI API key

⚑ Installation

  1. Clone the repository:
git clone https://github.com/your-username/ai-code-generator.git
cd ai-code-generator
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file in the backend folder with your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here