Skip to content

An interactive document search app in Python using open-source LLMs, integrated into a web-based frontend.

License

Notifications You must be signed in to change notification settings

MichaelSykesUK/doc-query-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Query Application Setup Guide

This guide will help you set up and run the Document Query Application, which consists of a backend API and a frontend user interface.

Prerequisites

  • Python 3.8+
  • Node.js 14+ (includes npm)
  • Virtual Environment (Recommended)

Backend Setup

1. Create a Virtual Environment (Recommended)

python -m venv venv
source venv/bin/activate  # Linux/MacOS
venv\Scripts\activate   # Windows

2. Install Dependencies

pip install -r requirements.txt

3. Run the Backend API

python api.py

By default, the backend will be available at http://127.0.0.1:8000.


Frontend Setup

1. Install Node.js Packages

cd frontend
npm install

2. Build the Project

npm run build

3. Serve the Frontend Locally

Install http-server globally if not already done:

npm install -g http-server

Start the server:

http-server ./dist

The frontend will be available at http://127.0.0.1:8080.


Testing the Application

  1. Start both the backend and frontend servers.
  2. Open a browser and navigate to http://127.0.0.1:8080.
  3. Test API interactions through the user interface.

File Structure

/doc-query-llm
  |-- api.py              # Backend API script
  |-- requirements.txt     # Python dependencies
  |-- frontend/            # Frontend project directory
      |-- package.json     # Node.js dependencies
      |-- src/             # Source code for the frontend
      |-- dist/            # Built frontend files

Notes

  • Keep requirements.txt and package.json updated.
  • For new Python packages, run:
    pip freeze > requirements.txt
  • For new Node.js packages, run:
    npm install <package> --save
  • Always commit both requirements.txt and package-lock.json to version control.

This setup guide ensures a smooth deployment and consistent development experience for your application.

About

An interactive document search app in Python using open-source LLMs, integrated into a web-based frontend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published