CodeNova is an AI-powered code assistant designed to streamline software development by automating code generation, debugging, documentation, and code explanations. It integrates multiple AI models to provide a seamless and intelligent coding experience.integrating IBM's Granite LLMs to enhance software development workflows. This project was built for the Generative AI Hackathon with IBM GRANITE and provides business-valued solutions by automating various software engineering tasks.
To access CodeNova through streamlit click CodeNova (open in dark mode for better user experience)
The application includes six main tools:
- Code Wizard - Automatically generate code based on user input prompt.
- Fix-it - Identify and fix issues in the provided code.
- Code Whisperer - Provide detailed text & voice-based explanations of code functionality.
- Code Optimizer - Improve code structure and efficiency.
- DocuBot - Generate structured documentation in TXT, PDF and DOCX formats.
- AI Pair Coder - Assist developers in real-time coding collaborations.
CodeNova leverages IBM Granite AI models for core functionalities, ensuring high-performance AI-driven code assistance. Specific features are powered by industry-leading AI services:
- Python
- Streamlit - Used for Front-End UI and deployment
- IBM Granite-34B-Code-Instruct: – Used for code generation, debugging, optimization, and pair programming.
- IBM Granite-20B-Code-Instruct: - Powers text-based code explanations.
- Google Gemini Pro – Enables comprehensive document generation to streamline documentation tasks.
- Google Text-to-Speech – Provides text and voice-based code explanations, enhancing developer understanding.
-
Clone the repository:
git clone https://github.com/allen-reji/CodeNova.git cd CodeNova
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Set Up API Keys: CodeNova uses IBM Granite, Google Gemini Pro, and Google Text-to-Speech. Ensure you have the necessary API keys configured in a
.env
file.- Create a
.env
file in the project root directory:
touch .env
- Add your API keys:
IBM_API_KEY="your-ibm-api-key" GOOGLE_API_KEY="your-google-api-key"
- Create a
-
In
config.py
, replaceGemini_API_key=st.secrets["GEMINI_API_KEY"]
andAPI_KEY = os.getenv("IBM_CLOUD_API_KEY")
with direct retrieval from.env
file by doing the below.from dotenv import load_dotenv # Load environment variables from .env file load_dotenv() #Retrieve API Keys from .env file Gemini_API_key = os.getenv("GEMINI_API_KEY") API_KEY = os.getenv("IBM_CLOUD_API_KEY")
-
In
tts_helper.py
replace lines 9-19 with the following.os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "{Enter file path for Google Text-to-Speech API JSON file}"
-
Run the Application:
streamlit run app.py
The app will be available at
http://localhost:8501
- Navigate through the sidebar to select a tool.
- Input your code or query and click 'Generate'.
- View, copy, or download the output.
- Use the documentation generator for structured reports.
- Accelerated Development: AI-driven code generation and refactoring reduce development time.
- Enhanced Code Quality: Intelligent debugging and optimization ensure clean, maintainable code.
- Accessibility: Provides multiple output formats, including audio explanations.
- AI-Powered Collaboration: Acts as a virtual pair programmer, improving productivity and reducing bottlenecks in software development.
- Enhanced AI Models
- Integration with IDE plugins.
- Advanced AI-driven pair programming.
- Enterprise Adoption
- Global Developer Reach
This project is licensed under the MIT License.
- Nidhish Balasubramanya - nidhishbalasubramanya@gmail.com
- Nathania Rachael - nathaniarachael@gmail.com
- Allen Reji - allenreji@gmail.com
Developed for Generative AI Hackathon with IBM GRANITE