| | --- |
| | license: apache-2.0 |
| | datasets: |
| | - codeparrot/codeparrot-clean |
| | language: |
| | - en |
| | metrics: |
| | - code_eval |
| | library_name: adapter-transformers |
| | tags: |
| | - code |
| | --- |
| | # Code Generator with Chat Interface |
| |
|
| | This project trains a code generator model using Hugging Face's GPT-2 and deploys it with a chat interface using FastAPI and CodeMirror for syntax highlighting. |
| |
|
| | ## Setup |
| |
|
| | 1. Install dependencies: |
| | ```bash |
| | pip install -r requirements.txt |
| | ``` |
| | |
| | 2. Train the model: |
| | ```bash |
| | python model_training.py |
| | ``` |
| | |
| | 3. Run the FastAPI server: |
| | ```bash |
| | uvicorn app:app --reload |
| | ``` |
| | |
| | 4. Open `index.html` in your browser to interact with the model. |