Views
No views yet
1import joblib
2from huggingface_hub import hf_hub_download
3
4# Download the model
5model_path = hf_hub_download(
6 repo_id="yimingwang123/hybrid-grade-assessment-model",
7 filename="hybrid_readability_model.pkl"
8)
9
10# Load the model
11model_data = joblib.load(model_path)
12
13# Extract components
14ridge_model = model_data['ridge_model']
15rf_model = model_data['rf_model']
16scaler = model_data['scaler']
17feature_columns = model_data['feature_columns']
18
19# Make predictions (you'll need to implement the hybrid logic)
20# See the training script for full implementation1def predict_hybrid(ridge_pred, rf_pred):
2 if ridge_pred <= 5.0:
3 return rf_pred # Use Random Forest for lower grades
4 else:
5 return ridge_pred # Use Ridge for higher grades1@misc{hybrid-readability-model,
2 title={Hybrid Readability Assessment Model},
3 author={Grade-Aware LLM Project},
4 year={2025},
5 url={https://huggingface.co/yimingwang123/hybrid-grade-assessment-model}
6}