Skip to content

Commit

Permalink
Merge pull request #5 from doccano/release/v0.0.3
Browse files Browse the repository at this point in the history
Release/v0.0.3
  • Loading branch information
Hironsan authored Mar 16, 2023
2 parents 0e30317 + 0736dcb commit b473669
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

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.

![Demo](./docs/images/demo.jpg)

Note: This is an experimental project.

## Installation
Expand All @@ -28,6 +26,24 @@ 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](./docs/images/annotation.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](./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.

![Step3](./docs/images/download_config.jpg)

## Development

```bash
Expand Down
14 changes: 5 additions & 9 deletions doccano_mini/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ def main():
prompt.prefix = instruction

st.header("Test")
text = st.text_area(label="Please enter your text.", value="")

st.header("Model Options")
col1, col2 = st.columns([3, 1])
text = col1.text_area(label="Please enter your text.", value="", height=300)

# https://platform.openai.com/docs/models/gpt-3-5
available_models = (
Expand All @@ -54,13 +53,10 @@ def main():
"text-davinci-002",
"code-davinci-002",
)

# Use text-davinci-003 by default.
model_name = st.selectbox("Select an OpenAI model to use.", available_models, index=2)

temperature = st.slider("Temperature", min_value=0.0, max_value=1.0, value=0.7, step=0.01)

top_p = st.slider("Top-p", min_value=0.0, max_value=1.0, value=1.0, step=0.01)
model_name = col2.selectbox("Model", available_models, index=2)
temperature = col2.slider("Temperature", min_value=0.0, max_value=1.0, value=0.7, step=0.01)
top_p = col2.slider("Top-p", min_value=0.0, max_value=1.0, value=1.0, step=0.01)

if st.button("Predict"):
llm = OpenAI(model_name=model_name, temperature=temperature, top_p=top_p)
Expand Down
Binary file added docs/images/annotation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/demo.jpg
Binary file not shown.
Binary file added docs/images/download_config.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/test_new_example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "doccano-mini"
version = "0.0.2"
version = "0.0.3"
description = "Generate LangChain config quickly"
authors = ["Hironsan <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit b473669

Please sign in to comment.