Skip to content

exactpro/test2text

Repository files navigation

Setup

This project uses:

  • python version higher than 3.9 with sqlite version higher than 3.35 with option enable load extentions.
  • UV to manage the virtual environment. To install UV, run the following command:
pip install uv

To create the virtual environment, run the following command:

uv venv

To install the dependencies, run the following command:

uv sync

PyTorch version

PyTorch is default set to CPU distributive:

[tool.uv.sources]
torch = {index = "pytorch-cpu"}

If you want to use a CUDA distributive, replace index with one of the following values:

  • pytorch-cu118
  • pytorch-cu124
  • pytorch-cu126

Regenerate lock file:

uv lock

Please do not commit updated lock file into GIT

Install dependencies from the updated lock file:

uv sync

How it works

We use nomic-ai/nomic-embed-text-v1 to create embeddings from text. We then store these embeddings in a SQLite database. We use the sqlite-vec library to store and query the embeddings.

Database

erDiagram
    Annotations {
        INTEGER id
        TEXT summary
        float[] embedding
    }
    Requirements {
        INTEGER id
        TEXT external_id
        TEXT summary
        float[] embedding
    }
    AnnotationsToRequirements {
        INTEGER annotation_id
        INTEGER requirement_id
        REAL cached_distance
    }
    TestCases {
        INTEGER id
        TEXT test_script
        TEXT test_case
    }
    CasesToAnnos {
        INTEGER case_id
        INTEGER annotation_id
    }

    Requirements ||--o{ AnnotationsToRequirements : requirement_id
    Annotations ||--o{ AnnotationsToRequirements : annotation_id
    TestCases ||--o{ CasesToAnnos : case_id
    Annotations ||--o{ CasesToAnnos : annotation_id
Loading

Usage

To run UI of this app use following command:

streamlit run main.py

For running first time use following command to install dependencies if necessary

uv run streamlit run main.py

About

Test 2 Text

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages