File size: 2,500 Bytes
59e348f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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**:
   ```bash

   pip install -e .

   ```

2. **Run the App**:
   ```bash

   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**:
   ```bash

   docker build -t qualivec .

   ```

2. **Run the Docker Container**:
   ```bash

   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:
```csv

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:
```csv

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