# AI use cases for Lilly (ssaaffaakk/Lilly)

Repo: [ssaaffaakk/Lilly](https://github.com/ssaaffaakk/Lilly) | Use cases: 5 | Page: https://dedupedai.com/use-cases/ssaaffaakk-lilly/

Lilly is an offline Bosnian to English translator with a web app that also handles typed English-to-Bosnian replies, speech, photographs, and documents.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Translate Bosnian text to English on your own machine: https://dedupedai.com/use-cases/ssaaffaakk-lilly/translate-bosnian-text-offline/
- Read a Bosnian sign or whiteboard from a photo: https://dedupedai.com/use-cases/ssaaffaakk-lilly/read-bosnian-sign-from-photo/
- Translate a Bosnian .docx or PDF file to English: https://dedupedai.com/use-cases/ssaaffaakk-lilly/translate-bosnian-document/
- Speak English and hear the Bosnian reply: https://dedupedai.com/use-cases/ssaaffaakk-lilly/hear-english-answer-in-bosnian/
- Batch-translate a folder of Bosnian text with the Python API: https://dedupedai.com/use-cases/ssaaffaakk-lilly/batch-translate-bosnian-files-with-python/

## How to translate Bosnian text to English on your own machine with Lilly

Repo: [ssaaffaakk/Lilly](https://github.com/ssaaffaakk/Lilly) | Difficulty: Intermediate | Time: 60 minutes | Basis: From the README

Run Lilly locally so Bosnian text is translated with no internet after the model fetch.

**Who it is for:** A student or worker who receives Bosnian messages or notes and wants a private translator on their own computer.

**The problem:** Online translators get Bosnian sentences wrong, and you may not want to send the text to a third party.

**The outcome:** A local web page at localhost:8000 that turns typed Bosnian into English.

### Steps

1. Create the environment: `uv venv .venv --python 3.12`
2. Install the dependencies: `uv pip install --python .venv/bin/python -r requirements.txt`
3. Fetch the models: `.venv/bin/python scripts/fetch_models.py`
4. Start the server: `.venv/bin/uvicorn app.server:app --port 8000`
5. Open http://localhost:8000 and type a Bosnian sentence such as a message you received

### Prompt to paste into your agent

```text
In the repo ssaaffaakk/Lilly, set up the local app with the README steps, then translate the Bosnian sentence <bosnian sentence> through lilly.translate or POST /api/translate. Expected output: the English text returned by the app. Verify that the server answers on http://localhost:8000 before reporting the translation.
```

### Caveat

The README reports 43.25 BLEU on 1,012 held-out FLORES-200 sentences, so check important translations before relying on them.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ssaaffaakk-lilly/translate-bosnian-text-offline/

## How to read a Bosnian sign or whiteboard from a photo with Lilly

Repo: [ssaaffaakk/Lilly](https://github.com/ssaaffaakk/Lilly) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Point a camera at a sign and see its English translation drawn over the photo.

**Who it is for:** A visitor or intern in Bosnia who needs to understand a sign, notice, or whiteboard right away.

**The problem:** Signs and boards in Bosnian are unreadable without the language, and you need the meaning on the spot.

**The outcome:** A photo with each text region's English translation overlaid on it.

### Steps

1. Open the live demo at safak11-lilly-api.hf.space in its own browser tab, especially on a phone
2. Allow camera access when the page asks
3. Point the camera at the sign and wait for the regions to appear
4. Read each region's translation over the sign and tap the correction button if a line is wrong

### Prompt to paste into your agent

```text
Using the live Lilly demo at safak11-lilly-api.hf.space from the ssaaffaakk/Lilly repo, submit a photo of <sign image> to the photo reading flow. Expected output: the sign text and its English translation, one per region. Verify that the regions match the visible text in the photo before reporting.
```

### Caveat

On 40 Commons photographs the reader found 67.0% of the text and invented 65 pieces, so compare each result with the real sign.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ssaaffaakk-lilly/read-bosnian-sign-from-photo/

## How to translate a Bosnian .docx or PDF file to English with Lilly

Repo: [ssaaffaakk/Lilly](https://github.com/ssaaffaakk/Lilly) | Difficulty: Intermediate | Time: 60 minutes | Basis: From the README

Upload a Word or PDF file and get its text translated sentence by sentence.

**Who it is for:** A researcher or office worker who received a Bosnian report, form, or letter and needs the English content.

**The problem:** Copying a long document into a translator loses layout and takes time, and Bosnian documents are hard to follow without help.

**The outcome:** The text of the uploaded document, translated through the same sentence path as typed text.

### Steps

1. Create the environment: `uv venv .venv --python 3.12`
2. Install the dependencies: `uv pip install --python .venv/bin/python -r requirements.txt`
3. Fetch the models: `.venv/bin/python scripts/fetch_models.py`
4. Start the server: `.venv/bin/uvicorn app.server:app --port 8000`
5. Open http://localhost:8000, choose the document panel, and upload your .docx or .pdf file

### Prompt to paste into your agent

```text
In the repo ssaaffaakk/Lilly, set up the app with the README steps, then send the file <document path> to POST /api/document. Expected output: the extracted and translated text. Verify that the number of translated sentences is close to the number of sentences in the source file.
```

### Caveat

The README lists .docx and .pdf upload as a feature but does not give measured results for document extraction, so check the output against the original.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ssaaffaakk-lilly/translate-bosnian-document/

## How to speak English and hear the Bosnian reply with Lilly

Repo: [ssaaffaakk/Lilly](https://github.com/ssaaffaakk/Lilly) | Difficulty: Intermediate | Time: 60 minutes | Basis: From the README

Talk in English, get the Bosnian reply, and hear it read aloud in Bosnian.

**Who it is for:** A person in a Bosnian-speaking meeting or class who wants to answer in Bosnian without knowing how to say it.

**The problem:** You know what you want to say in English but cannot produce a correct Bosnian reply or pronounce it.

**The outcome:** A Bosnian text reply and a spoken Bosnian reply from your English words.

### Steps

1. Set up and fetch the models with the README steps, including `.venv/bin/python scripts/fetch_models.py`
2. Start the server: `.venv/bin/uvicorn app.server:app --port 8000`
3. Open http://localhost:8000 and press the swap arrow between the two language names so Lilly hears English
4. Press the microphone, say your English sentence, and read the Bosnian reply
5. Play the spoken reply, which uses the Bosnian voice

### Prompt to paste into your agent

```text
In the repo ssaaffaakk/Lilly, confirm that translator-en-bs/ and speak-bs/ exist after setup, then call POST /api/reply with the English text <english sentence>. Expected output: the Bosnian reply text. Verify that /api/speak with language bs returns WAV audio rather than a 503.
```

### Caveat

The Bosnian voice is a stock regional Piper checkpoint trained on Lower Sorbian recordings, and the README measures its output at 22.3% word error, so it is not a native Bosnian voice.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ssaaffaakk-lilly/hear-english-answer-in-bosnian/

## How to batch-translate a folder of Bosnian text with the Python API with Lilly

Repo: [ssaaffaakk/Lilly](https://github.com/ssaaffaakk/Lilly) | Difficulty: Advanced | Time: 60 minutes | Basis: From the README

Call Lilly's Python object from a script to translate many Bosnian lines in one run.

**Who it is for:** A developer or agent that needs to translate a list of Bosnian sentences into English for a dataset or report.

**The problem:** Translating many lines by hand in the web page takes too long and cannot be repeated.

**The outcome:** A file of English translations produced from a list of Bosnian lines.

### Steps

1. Create the environment: `uv venv .venv --python 3.12`
2. Install the dependencies: `uv pip install --python .venv/bin/python -r requirements.txt`
3. Fetch the models: `.venv/bin/python scripts/fetch_models.py`
4. Write a script that reads each Bosnian line from your input file and calls `lilly.translate(line)` from `app.lilly` (inferred, check the README)
5. Run the script with `.venv/bin/python` and write each result next to its source line (inferred, check the README)

### Prompt to paste into your agent

```text
In the repo ssaaffaakk/Lilly, use the Python object lilly from app.lilly to call translate on each line of <input file>. Expected output: one English line per Bosnian input line, saved to <output file>. Verify that the line counts of input and output match before reporting.
```

### Caveat

The translator is measured on FLORES-200 sentences, so batch output on other text may vary and should be spot-checked.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/ssaaffaakk-lilly/batch-translate-bosnian-files-with-python/
