Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- codeparrot/codeparrot-clean
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
metrics:
|
8 |
+
- code_eval
|
9 |
+
library_name: adapter-transformers
|
10 |
+
tags:
|
11 |
+
- code
|
12 |
+
---
|
13 |
+
# Code Generator with Chat Interface
|
14 |
+
|
15 |
+
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.
|
16 |
+
|
17 |
+
## Setup
|
18 |
+
|
19 |
+
1. Install dependencies:
|
20 |
+
```bash
|
21 |
+
pip install -r requirements.txt
|
22 |
+
```
|
23 |
+
|
24 |
+
2. Train the model:
|
25 |
+
```bash
|
26 |
+
python model_training.py
|
27 |
+
```
|
28 |
+
|
29 |
+
3. Run the FastAPI server:
|
30 |
+
```bash
|
31 |
+
uvicorn app:app --reload
|
32 |
+
```
|
33 |
+
|
34 |
+
4. Open `index.html` in your browser to interact with the model.
|