|
|
---
|
|
|
license: mit
|
|
|
tags:
|
|
|
- code-quality
|
|
|
- tensorflow
|
|
|
- machine-learning
|
|
|
- code-review
|
|
|
- agentic-ai
|
|
|
---
|
|
|
|
|
|
# AutoReview Agent - Code Quality Scorer
|
|
|
|
|
|
A TensorFlow neural network trained to predict code quality scores (0-10).
|
|
|
|
|
|
## Model Details
|
|
|
|
|
|
- **Framework**: TensorFlow/Keras
|
|
|
- **Input**: 10 code features
|
|
|
- **Output**: Quality score (0-1)
|
|
|
- **Validation Loss**: 0.0006
|
|
|
- **Precision**: 100%
|
|
|
|
|
|
## Training
|
|
|
|
|
|
- Dataset: 1000 code samples
|
|
|
- Training samples: 800
|
|
|
- Validation samples: 200
|
|
|
- Hardware: GPU (Tesla T4) on Kaggle
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
```python
|
|
|
import tensorflow as tf
|
|
|
import numpy as np
|
|
|
|
|
|
# Load model
|
|
|
model = tf.keras.models.load_model('code_quality_model.keras')
|
|
|
|
|
|
# Extract features from code
|
|
|
features = np.array([[200, 15, 1, 1, 5, 2, 0, 1, 3, 1]])
|
|
|
|
|
|
# Predict
|
|
|
prediction = model.predict(features)
|
|
|
quality_score = prediction[0][0] * 10
|
|
|
print(f"Code Quality: {quality_score:.1f}/10")
|
|
|
```
|
|
|
|
|
|
## Project
|
|
|
|
|
|
Part of AutoReview Agent - Autonomous Code Reviewer
|
|
|
|
|
|
Technologies:
|
|
|
- TensorFlow: Quality detection
|
|
|
- Hugging Face: Model hosting
|
|
|
- LangChain: Agentic reasoning
|
|
|
- OpenRouter 70B: Complex analysis
|
|
|
|
|
|
GitHub: https://github.com/aviral199/autoreview-agent
|
|
|
|
|
|
---
|
|
|
|
|
|
Trained on Kaggle with GPU acceleration.
|
|
|
|