BS-LLM-WebUI

React - Django application for interacting with LLM's hosted locally with Ollama.

MIT License

Stars
4
Committers
2

BS-LLM-WebUI

Description

BS-LLM-WebUI is a web application with a frontend built using React and Vite, and a backend powered by Django with a Poetry-managed virtual environment.

Table of Contents

Prerequisites

  • Node.js: Make sure you have Node.js installed to manage frontend dependencies.
  • Python: Ensure that Python 3.8+ is installed for running the Django backend.
  • Poetry: Make sure you have Poetry installed to manage Python dependencies.
  • Ollama: Ensure you have Ollama installed on your machine, or a machine on your local network.

Frontend Setup (React with Vite)

1. Navigate to the Frontend Directory

cd frontend

2. Install Dependencies

npm install

3. Start the Development Server

npm run dev

This will start the Vite development server, and you should be able to access the frontend at http://localhost:5173 by default.

Backend Setup (Django with Poetry)

1. Navigate to the Backend Directory

cd backend

2. Install Dependencies via Poetry

poetry install

3. Apply Database Migrations

poetry run python manage.py migrate

4. Create a Superuser (Optional, but recommended)

poetry run python manage.py createsuperuser

5. Start the Django Development Server

poetry run python manage.py runserver

This will start the Django development server, which will be accessible at http://localhost:8000 by default.

Running the Application

To run the application, start both the frontend and backend servers as described above:

  1. Start the Vite development server in the frontend directory.
  2. Start the Django development server in the backend directory.

The frontend React application will communicate with the Django backend via API calls.

License

This project is licensed under the MIT License. See the LICENSE file for details.