yeswanthvarma's picture
Update README.md
6b69d68 verified
|
raw
history blame
2.54 kB
---
title: Answer Evaluation App
emoji: 🧠
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
---
# Answer Evaluation App ✍️
# πŸ“ Handwritten Answer Evaluation App using OCR + XLNet
An end-to-end machine learning application that extracts handwritten answers from images and evaluates them using a custom XLNet model trained on semantic similarity.
---
## πŸš€ Live Demo
πŸ‘‰ [Try it on Hugging Face Spaces](https://yeswanthvarma-answer-evaluation-app.hf.space)
---
## πŸ“Œ Project Overview
This app takes images of handwritten answers and performs:
1. **OCR** to extract text from question, student answer, and reference answer.
2. **Similarity scoring** using a custom-trained XLNet model.
3. **Bonus logic** to adjust the final score based on thresholds.
4. **User interface** to upload images and view the evaluated score.
---
## 🧠 Core Technologies
- **FastAPI**: Web framework
- **EasyOCR**: For extracting handwritten text
- **Hugging Face Transformers**: XLNet model
- **Custom Training**: Trained on Q-A-R triplets
- **Docker**: For containerized deployment
- **Hugging Face Spaces**: Live hosted app
---
## πŸ“¦ Folder Structure
```
answer-evaluation-app/
β”œβ”€β”€ app.py # FastAPI application
β”œβ”€β”€ requirements.txt # Dependencies
β”œβ”€β”€ Dockerfile # For Hugging Face deployment
β”œβ”€β”€ utils/
β”‚ β”œβ”€β”€ image_processor.py # EasyOCR + preprocessing
β”‚ └── xlnet_model.py # Model load and prediction
β”œβ”€β”€ templates/
β”‚ └── index.html # Frontend HTML
β”œβ”€β”€ static/
β”‚ β”œβ”€β”€ css/style.css # UI styling
β”‚ β”œβ”€β”€ js/main.js # JS for client interaction
β”‚ └── uploads/ # Uploaded image storage
```
---
## πŸ” Model Details
- **Base Model**: `xlnet-base-cased` (Hugging Face)
- **Custom Trained On**: Question, student answer, reference answer, and human-evaluated scores
- **Loss**: MSELoss
- **Output**: Score from 0 to 100
---
## ✍️ Sample Use Case
- Upload 3 images:
- Question image
- Student handwritten answer
- Reference answer
- App will:
- Extract text
- Score similarity using model
- Apply bonus logic
- Display final score and extracted text
---
## πŸ§‘β€πŸ’» Author
**Yeswanth Varma Gottumukkala**
- Email: [email protected]
---
## πŸ“œ License
This project is for educational and research purposes.
Model and app are freely available to explore on Hugging Face Spaces.