CoolFace
Apppublic

Djshubh/answersheet-evaluator

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

RAG Based IAS answersheet evaluator

  1. 1.Homepage :
  2. 2.Upload the images of answersheets to get output.
  3. 3.Inference Flow is given in Rag diagram
  1. 1.Knowledge Doc uploader ( route : /admin-panel )
  2. 2.Upload the pdf manual to process it, chunk it, convert it to embeddings, and save it to vectordb
  3. 3.Output : You will be able to see the chunk format which are stored to db.
  4. 4.Note: In deployment only chunks will be return, no updation of db happens to prevent de-duplication. (code is commented to save_embeddings)

Tech Stack -

  • Programming Language : Python
  • Framework (Backend & Frontend) : FastAPI with Jinja template
  • LLM : Google Gemini 1.5 pro for creating embeddings and knowledge base and Google Gemini 2.0 flash for evaluating answers.
  • Vector DB : Weaviate
  • Embeddings : Weaviate Text-to-Vec
  • Inference : using huggingface & docker - [https://djshubh-answersheet-evaluator.hf.space/]

NOTE : Weaviate DB credentials have expired, so app wont be able to fetch embeddings.

Chuking Strategy

  • Based on subsections, complete subsection / paragraph or list of bullet points are chunked, complete table is chunked as one embedding.

run locally :

python -m venv venv
source venv/bin/activate

Install the dependencies

pip install -r requirements.txt

Step 1: Build the Docker image for other platforms:

docker build -t answersheet-eval .

Run the container locally:

docker run -d -p 8080:8080 answersheet-eval

Access the app: Open http://localhost:8080

FOR deploying on huggingface:

Check out this link


https://huggingface.co/docs/hub/spaces-sdks-docker
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
CORS Rerefence - https://huggingface.co/blog/HemanthSai7/deploy-applications-on-huggingface-spaces