Update README.md
Browse filesHere’s the full usage note for your Hugging Face weight page and to integrate with the GitHub README:
📦 Model Weights Usage
This repository hosts two separate model weights that need to be used together for full functionality:
✅ Style Encoder Checkpoint (first stage):Trained with contrastive learning to extract explicit style embeddings.
✅ Flan-T5 Generator Checkpoint (second stage):Fine-tuned to generate code while incorporating the style embeddings.
To use these weights:
1️⃣ Clone the Style2Code repository:
git clone https://github.com/zh19980811/Style2Code.git
cd Style2Code
2️⃣ Modify the file paths in run.py, train_stage1/train_stage1.py, and train_stage2/run_ddp.sh to point to the correct weight files.
3️⃣ Use the provided scripts to load the style encoder and the Flan-T5 generator together for either inference or further fine-tuning.
ℹ️ The weights must be used together, as they are complementary:The style encoder extracts style embeddings, and the generator (Flan-T5) conditions on these embeddings for style-controlled code generation.
For more details, please refer to the Style2Code GitHub repository.