oMarquess / rgt_assessment_2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Document-Understanding Home Assessment (DUHA)

Overview

This application leverages advanced AI to understand and answer questions based on PDF or CSV files. It utilizes LangChain, ChromaDB, and OpenAI's models. Project Image

Features

  • Custom file handling command for PDF/CSV files.
  • Django Rest API Backend with a frontend application.
  • Integration with LangChain and OpenAI's models.
  • ChromaDB for embedding data storage and retrieval.
  • LangChain for conversational and user feedback mechanism based on memory.
  • Context limited to the provided document.

Running the Application

  1. pip install -r requirements.txt
  2. cd duha

Backend :: [Django-Rest Framework - API Engine]

  1. Run python manage.py runserver 8000 to start the Django server on port 8000.

Frontend (Port 8001)

  1. Open a new terminal and start a separate (frontend) server on python manage.py runserver 8001
  2. Alternatively, you may navigate to the "templates/index.html" and run a live server from VS Code.

File Handling

  1. Drop your PDF or CSV file in the library folder which has been listed in .gitignore file [kindly recreate it in the duha/ directory] and run the command python manage.py file_handler .\library\<filename>
  2. Alternatively, run the command python manage.py file_handler <path to your preferred PDF / CSV>
  • The file_handler custom command handles the splitting, embedding and saving of the file chunks to a persistent ChromaDB.

API Interaction

The application is secured with authentication and uses Django's REST framework.

Contributing

Contributions are welcome in the form of comments.

About

License:Apache License 2.0


Languages

Language:Python 74.2%Language:HTML 25.8%