Skip to content

Sainvi-j/hackrx-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

HackRx App

A FastAPI-based application for the HackRx challenge, designed to process documents and answer questions using embeddings and QA models.

Overview

This app uses:

  • all-MiniLM-L6-v2 for embeddings.
  • distilbert-base-uncased-distilled-squad for question answering.
  • Pinecone for vector storage.
  • PyPDF2 for document parsing.

Setup

  1. Install Dependencies:
    .\hackrx_env\Scripts\Activate.ps1
    pip install -r requirements.txt
  2. Pre-download Models (run once):
    python -c "from transformers import AutoTokenizer, AutoModel, pipeline; AutoTokenizer.from_pretrained('distilbert-base-uncased'); AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-v2'); pipeline('question-answering', model='distilbert-base-uncased-distilled-squad')"
  3. Run Locally:
    uvicorn main:app --host 0.0.0.0 --port 10000

Deploy with ngrok

  1. Download ngrok from ngrok.com.
  2. Start ngrok:
    .\ngrok http 10000

Notes

  • Tested locally with ~2-4s response times (4.23s, 2.34s, 708ms).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages