codeparrot/codeparrot-clean
Viewer • Updated • 5.17M • 23.5k • 87
How to use dnnsdunca/Logical_Algorithm with Adapters:
from adapters import AutoAdapterModel
model = AutoAdapterModel.from_pretrained("undefined")
model.load_adapter("dnnsdunca/Logical_Algorithm", set_active=True)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.
Install dependencies:
pip install -r requirements.txt
Train the model:
python model_training.py
Run the FastAPI server:
uvicorn app:app --reload
Open index.html in your browser to interact with the model.