Skip to content

Rohithsai-GitHub/Code-Modernization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑️ Universal Code Translator & Enhancer

Convert code between programming languages or improve its readability β€” instantly, intelligently.
Powered by Google Gemini + LangChain, wrapped in a simple Streamlit UI.

πŸ”— Live Demo: https://code-modernization.onrender.com
Note: This was deployed on Render (Free Tier). So, it takes 40 sec to load


✨ Features

  • πŸ”„ Translate code across multiple languages
  • 🧼 Improve code readability and structure
  • πŸ€– AI-powered with Gemini 2.0 Flash
  • πŸ§ͺ Supports: Python, C++, JavaScript, Go, Rust, and more

πŸš€ Getting Started

1. Clone this repo

git clone https://github.com/your-username/code-modernization.git
cd code-modernization

2. Install dependencies

pip install -r requirements.txt

3. Set up environment

Create a .env file with your Google API Key:

GOOGLE_API_KEY=your_key_here

4. Run the app

streamlit run app.py

🧠 How It Works

  • LLM: Gemini 2.0 Flash (via LangChain)
  • Classification: Determines if input is code or text
  • Conversion Mode: Translates between selected languages
  • Enhancement Mode: If input/output language is the same, code is enhanced for clarity

πŸ’Ό Tech Stack


πŸ“„ Files

  • app.py – Main application logic and UI
  • requirements.txt – Python dependencies

πŸ“¬ Feedback

Open an issue or submit a PR β€” contributions welcome!


About

This a Code Translator and Enhancer

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages