How shreesha41223/ccgullm_t256 works
This repository implements a Java code-comment generator with a Streamlit interface and a trainable code-to-comment Transformer. In the interactive workflow, Java source is normalized and translated; inference derives an AST-aligned type sequence, tokenizes both inputs, encodes them, and generates comment tokens. A separate dataset-preparation and training branch creates aligned examples, builds tokenizers and datasets, trains the model, and validates it. The README is empty, so capabilities and links are based on the supplied source excerpts and SOURCE INDEX; test.py was not sampled.
Main entry points: train.py Training runner · translate.py Translation orchestrator · app.py Streamlit app · create_dataset_json_file.py Dataset JSON builder
Components 15
User interface
- Streamlit app
app.py - Source normalizer
app.py - Generated comment
Comment inference
- Translation orchestrator
translate.py - AST type alignment
get_CAT.py - Code and comment tokenizers
tokenizer.py - Encoder-decoder model
model2.py
Dataset preparation
- Dataset JSON builder
myDataset/create_dataset_json_file.py - Train and test JSON
myDataset
Model training
- Tokenized dataset
dataset.py - Training runner
train.py - Validation runner
test.py - Model configuration
config.py - Weights and tokenizer files
Other components
- Java developer
Connections 18
- Java developer → Streamlit app: enters code
app.py - Streamlit app → Source normalizer: processes input
app.py - Streamlit app → Translation orchestrator: requests comment
app.py - Translation orchestrator → AST type alignment: derives types
translate.py - Translation orchestrator → Code and comment tokenizers: loads tokenizers
translate.py - Translation orchestrator → Encoder-decoder model: encodes and decodes
translate.py - Translation orchestrator → Model configuration: loads settings
translate.py - Translation orchestrator → Weights and tokenizer files: loads weights
translate.py - Translation orchestrator → Generated comment: returns decoded text
translate.py - Dataset JSON builder → AST type alignment: aligns code types
myDataset/create_dataset_json_file.py - Dataset JSON builder → Train and test JSON: writes examples
myDataset/create_dataset_json_file.py - Training runner → Train and test JSON: reads examples
train.py - Training runner → Code and comment tokenizers: builds tokenizers
train.py - Training runner → Tokenized dataset: creates data loaders
train.py - Training runner → Encoder-decoder model: trains model
train.py - Training runner → Validation runner: runs validation
train.py - Training runner → Model configuration: loads settings
train.py - Training runner → Weights and tokenizer files: saves checkpoints
train.py