Skip to content

Mahasvan/MunHelper

Repository files navigation

MunHelper

Context-based UN Resolution lookup.
Searches through every existing ECOSOC resolution and shows relevant data and extracts.

Features

  • OpenAPI-compatible API using FastAPI
  • Website using Streamlit
  • Instant ECOSOC Resolution lookup with semantic search
  • Ability to update documents with latest resolutions
  • Integration with Ollama for inference from resolution extracts
  • Docker Containerization
  • Auto Update (coming soon)

Installation with Docker

  • Install Docker Desktop and make sure Docker Compose is present.
  • Start the Docker Engine
  • Navigate to the project directory
    • cd MunHelper
  • Start the containers in detached mode using docker-compose
    •  docker-compose -f docker-compose.yml up -d
  • API is served at http://localhost:5000/docs.
  • Frontend is served at http://localhost:8051.

Usage

  • Before using anything, update the ChromaDB database.
    • If using the Documentation WebUI:
      • Visit the API Documentation at http://localhost:5000.
      • Run the /manage/update-chromadb endpoint.
    • If using the Frontend:
      • Hold on, I'm working on something.
    • Otherwise, perform a GET request on the /manage/update-chromadb endpoint and wait for the resolutions to populate.
  • They will now persist on local storgage.
  • If you wish to delete this data, delete the chroma-data volume on Docker.
    • docker volume ls
    • docker volume rm munhelper_chroma-data

Other Installation Methods

Note

These methods may leave residue if you decide to uninstall. I recommend using the Docker method for a cleaner installation.

Bare Metal installation instructions

Installation - Bare Metal

  • Clone the repository

    • git clone https://github.com/Mahasvan/Munhelper
  • Install the dependencies

    • pip install -r requirements.txt
  • Set up the ChromaDB database

    • Run the server using
    • chroma run
  • Install Ollama and pull preferred model

    • ollama pull llama3
  • Set up environment variables (refer app.py)

  • Change bare_metal variable in app.py to True

  • Start the API

    • python app.py
  • Access the API at http://localhost:5000/docs

  • Setting up the frontend

    • Open another terminal window, and cd into the frontend folder
    • Run streamlit run frontend.py
    • Frontend is served at http://localhost:8051
Docker build images from scratch

Run with Docker (build images from scratch)

  • Follow all steps in the Docker Instructions until the last step.
  • Start the containers using docker-compose-build instead of docker-compose
    •  docker-compose -f docker-compose-build.yml up -d
  • Make sure to read the Usage section.

About

Model United Nations Research Helper

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published