Skip to content

wizard0918/RSA

Repository files navigation

Nice Classification with RAG

Requirements

  • Python: Runtime Platform
  • OpenAI: Embedding of the text & Inference of the class
  • Qdrant: Vector Database

Prepare the environment

  1. Set up virtual environment for runtime
    • Linux or Macos
      python -m venv .venv
      source .venv/bin/activate
      pip install -r requirements.txt
    • Windows
      python -m venv .venv
      .venv/Scripts/activate
      pip install -r requirements.txt
  2. Configure the environment variables
    • Create a new .env file.
    • Edit .env file
      OPENAI_API_KEY="OPENAI_API_KEY"
      OPENAI_ORGANIZATION_KEY="OPENAI_ORGANIZATION_KEY"
      
      QDRANT_API_KEY="QDRANT_API_KEY"
      QDRANT_CLUSTER="QDRANT_CLUSTER"

How to prepare data

  1. Parse XML files to prepare the data
    python xml_parse.py
  2. Prepare the Qdrant and prepare the vector database
    python data_retrieve.py data/output.json

Run the server

  1. Run the flask server
    python -m flask run
  2. Results Screenshot from 2024-06-14 05-35-06 Screenshot from 2024-06-14 05-35-53

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published