Update README.md
Browse files
README.md
CHANGED
@@ -12,4 +12,89 @@ app_port: 7860
|
|
12 |
|
13 |
# Answer Evaluation App βοΈ
|
14 |
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# Answer Evaluation App βοΈ
|
14 |
|
15 |
+
# π Handwritten Answer Evaluation App using OCR + XLNet
|
16 |
+
|
17 |
+
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.
|
18 |
+
|
19 |
+
---
|
20 |
+
|
21 |
+
## π Live Demo
|
22 |
+
|
23 |
+
π [Try it on Hugging Face Spaces](https://yeswanthvarma-answer-evaluation-app.hf.space)
|
24 |
+
|
25 |
+
---
|
26 |
+
|
27 |
+
## π Project Overview
|
28 |
+
|
29 |
+
This app takes images of handwritten answers and performs:
|
30 |
+
1. **OCR** to extract text from question, student answer, and reference answer.
|
31 |
+
2. **Similarity scoring** using a custom-trained XLNet model.
|
32 |
+
3. **Bonus logic** to adjust the final score based on thresholds.
|
33 |
+
4. **User interface** to upload images and view the evaluated score.
|
34 |
+
|
35 |
+
---
|
36 |
+
|
37 |
+
## π§ Core Technologies
|
38 |
+
|
39 |
+
- **FastAPI**: Web framework
|
40 |
+
- **EasyOCR**: For extracting handwritten text
|
41 |
+
- **Hugging Face Transformers**: XLNet model
|
42 |
+
- **Custom Training**: Trained on Q-A-R triplets
|
43 |
+
- **Docker**: For containerized deployment
|
44 |
+
- **Hugging Face Spaces**: Live hosted app
|
45 |
+
|
46 |
+
---
|
47 |
+
|
48 |
+
## π¦ Folder Structure
|
49 |
+
|
50 |
+
```
|
51 |
+
answer-evaluation-app/
|
52 |
+
βββ app.py # FastAPI application
|
53 |
+
βββ requirements.txt # Dependencies
|
54 |
+
βββ Dockerfile # For Hugging Face deployment
|
55 |
+
βββ utils/
|
56 |
+
β βββ image_processor.py # EasyOCR + preprocessing
|
57 |
+
β βββ xlnet_model.py # Model load and prediction
|
58 |
+
βββ templates/
|
59 |
+
β βββ index.html # Frontend HTML
|
60 |
+
βββ static/
|
61 |
+
β βββ css/style.css # UI styling
|
62 |
+
β βββ js/main.js # JS for client interaction
|
63 |
+
β βββ uploads/ # Uploaded image storage
|
64 |
+
```
|
65 |
+
|
66 |
+
---
|
67 |
+
|
68 |
+
## π Model Details
|
69 |
+
|
70 |
+
- **Base Model**: `xlnet-base-cased` (Hugging Face)
|
71 |
+
- **Custom Trained On**: Question, student answer, reference answer, and human-evaluated scores
|
72 |
+
- **Loss**: MSELoss
|
73 |
+
- **Output**: Score from 0 to 100
|
74 |
+
---
|
75 |
+
|
76 |
+
## βοΈ Sample Use Case
|
77 |
+
|
78 |
+
- Upload 3 images:
|
79 |
+
- Question image
|
80 |
+
- Student handwritten answer
|
81 |
+
- Reference answer
|
82 |
+
- App will:
|
83 |
+
- Extract text
|
84 |
+
- Score similarity using model
|
85 |
+
- Apply bonus logic
|
86 |
+
- Display final score and extracted text
|
87 |
+
|
88 |
+
---
|
89 |
+
|
90 |
+
## π§βπ» Author
|
91 |
+
|
92 |
+
**Yeswanth Varma Gottumukkala**
|
93 |
+
- Email: [email protected]
|
94 |
+
|
95 |
+
---
|
96 |
+
|
97 |
+
## π License
|
98 |
+
|
99 |
+
This project is for educational and research purposes.
|
100 |
+
Model and app are freely available to explore on Hugging Face Spaces.
|