Metadata-Version: 2.1
Name: doccano-mini
Version: 0.0.6
Summary: Annotation meets Large Language Models.
Home-page: https://github.com/doccano/doccano-mini
License: MIT
Author: Hironsan
Author-email: hiroki.nakayama.py@gmail.com
Requires-Python: >=3.8, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: langchain (>=0.0.113,<0.0.114)
Requires-Dist: openai (>=0.27.2,<0.28.0)
Requires-Dist: streamlit (>=1.20.0,<2.0.0)
Project-URL: Repository, https://github.com/doccano/doccano-mini
Description-Content-Type: text/markdown

# doccano-mini

doccano-mini is a few-shot annotation tool to assist the development of applications with Large language models (LLMs). Once you annotate a few text, you can test your task (e.g. text classification) with LLMs, then download the [LangChain](https://github.com/hwchase17/langchain)'s config.

Note: This is an experimental project.

## Installation

```bash
pip install doccano-mini
```

## Usage

For this example, we will be using OpenAI’s APIs, so we need to set the environment variable in the terminal.

```bash
export OPENAI_API_KEY="..."
```

Then, we can run the server.

```bash
doccano-mini
```

Now, we can open the browser and go to `http://localhost:8501/` to see the interface.

### Step1: Annotate a few text

In this step, we will annotate a few text. We can add a new text by clicking the `+` button. Try it out by double-clicking on any cell. You'll notice you can edit all cell values.

![Step1](https://raw.githubusercontent.com/doccano/doccano-mini/master/docs/images/annotation.gif)

The editor also supports pasting in tabular data from Google Sheets, Excel, and many other similar tools.

![Copy and Paste](https://raw.githubusercontent.com/doccano/doccano-mini/master/docs/images/copy_and_paste.gif)

### Step2: Test your task

In this step, we will test your task. We can enter a new test to the text box and click the `Predict` button. Then, we can see the result of the test.

![Step2](https://raw.githubusercontent.com/doccano/doccano-mini/master/docs/images/test_new_example.jpg)

### Step3: Download the config

In this step, we will download the [LangChain](https://github.com/hwchase17/langchain)'s config. We can click the `Download` button to download it. After loading the config file, we can predict a label for the new text.

```python
from langchain.chains import load_chain

chain = load_chain("chain.yaml")
chain.run("YOUR TEXT")
```

## Development

```bash
poetry install
streamlit run doccano_mini/app.py
```

