This project implements a Python-based coding assistant that uses a fine-tuned BERT model to parse a repository of code and suggest relevant functions or components based on user input. The assistant is accessible via a web interface powered by Flask, allowing users to easily search through code projects. It is an effort towards producing open-source alternatives to existing commercial tools like GitHub Copilot, making intelligent code recommendations more accessible.
Install the necessary Python packages by running:
pip install -r requirements.txt
The pre-trained BERT model was fine-tuned.
python fine_tune_bert.py
To provide a web interface for searching the code repository, the Flask API can be started at http://127.0.0.1:5000 by running:
python app.py
Open your web browser and navigate to http://127.0.0.1:5000
. Enter your search query in the input field and click "Search" to see the recommended functions along with their relevance scores.