Spaces:
Sleeping
Sleeping
CEFR Auto-Grader Web App - Quick Start Guide
Application Status
β RUNNING - Fully functional
Quick Access
- Web Interface: http://localhost:5000
- LAN Access: http://192.168.1.11:5000
Starting the Application
If the app is not running, start it from the project root:
cd /home/fwl/src/textmining
source .venv/bin/activate
python web_app/app.py
Or run in background:
nohup python web_app/app.py > web_app/flask.log 2>&1 &
Model Information
- Architecture: Metric Proto K3
- Base Model: KB/bert-base-swedish-cased
- Device: CUDA (GPU)
- Performance: 84.1% macro F1, 87.3% accuracy
Testing Examples
| Sentence | Predicted Level | Confidence |
|---|---|---|
| "Hej." | A1 | 98.9% |
| "Jag heter Anna." | A1 | 98.9% |
| "Jag studerar svenska." | A1 | 99.1% |
| "Den komplexa algoritmen..." | B2 | 99.0% |
| "Det metodologiska ramverket..." | C1 | 99.1% |
Features
- π Large text input area
- π Automatic sentence segmentation
- π¨ Color-coded CEFR levels (A1-C2)
- π Statistics dashboard
- π Level distribution visualization
- π Detailed results table
- β‘ Real-time processing
Files
app.py- Flask applicationmodel.py- Model loading & inferencetemplates/index.html- Web interfacestatic/css/style.css- Stylingstatic/js/app.js- Frontend logic
Troubleshooting
If predictions are all the same level:
- Check model loaded:
grep "Loading model" web_app/flask.log - Verify model path:
ls runs/metric-proto-k3/metric_proto.pt - Restart from project root:
cd /home/fwl/src/textmining
API Endpoint
curl -X POST http://localhost:5000/assess \
-H "Content-Type: application/json" \
-d '{"text": "Jag heter Anna."}'