quailvec / app /README.md
akhil-vaidya's picture
Upload 21 files
59e348f verified
|
Raw
History Blame
2.5 kB

QualiVec Streamlit Demo

This Streamlit application provides an interactive demonstration of the QualiVec library for qualitative content analysis using LLM embeddings.

Features

  • Interactive Data Upload: Upload your own CSV files for reference and labeled data
  • Model Configuration: Choose from different pre-trained embedding models
  • Threshold Optimization: Automatically find the optimal similarity threshold
  • Real-time Classification: See classification results as they happen
  • Comprehensive Evaluation: View detailed performance metrics and visualizations
  • Bootstrap Analysis: Get confidence intervals for robust evaluation

How to Run

Option 1: Local Installation

  1. Install Dependencies:

    pip install -e .
    
  2. Run the App:

    cd app
    uv run run_demo.py
    
  3. Access the App: Open your browser and navigate to http://localhost:8501

Option 2: Docker

  1. Build the Docker Image:

    docker build -t qualivec .
    
  2. Run the Docker Container:

    docker run --rm -p 8501:8501 qualivec
    
  3. Access the App: Open your browser and navigate to http://localhost:8501

Note: The Docker option provides a containerized environment with all dependencies pre-installed, making it easier to run the application without setting up a local Python environment.

Data Format Requirements

Reference Data (CSV)

Your reference data should contain:

  • tag: The class/category label
  • sentence: The example text for that category

Example:

tag,sentence
Positive,This is absolutely fantastic!
Negative,This is terrible and disappointing
Neutral,This is okay I guess

Labeled Data (CSV)

Your labeled data should contain:

  • sentence: The text to be classified
  • Label: The true class/category (for evaluation)

Example:

sentence,Label
I love this product so much!,Positive
Not very good quality,Negative
Average product nothing special,Neutral

Navigation

The app is organized into 5 main sections:

  1. 🏠 Home: Overview and introduction to QualiVec
  2. πŸ“Š Data Upload: Upload your reference and labeled data files
  3. πŸ”§ Configuration: Set up embedding models and parameters
  4. 🎯 Classification: Run the classification and optimization process
  5. πŸ“ˆ Results: View detailed results and download outputs