Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ The Standard pipeline above is **one of three tiers** available. Each has differ
| Lynote.ai | Everyone — all tiers, zero setup | Visit lynote.ai|
| n8n Workflow | No-code automation users | Import [`n8n/humanize_standard.json`](n8n/humanize_standard.json) |
| Python Script | Developers | See below |
| n8n Workflow | No-code automation users | See below |
| Docker | Full-stack users (UI + API) | See below |

### Python

Expand All @@ -118,6 +120,12 @@ cp config/config.example.toml config/config.toml
python -m src.standard.pipeline --input "Your AI-generated text here"
```

### Run with Docker

```bash
docker compose up --build
```

**DeepSeek (default):**

```toml
Expand Down Expand Up @@ -161,6 +169,8 @@ Override the API endpoint with `base_url` in `[llm]`, or via `LLM_BASE_URL` / `L
2. Configure the LLM API key and URL in the HTTP Request nodes (defaults to DeepSeek; point at OpenRouter's `https://openrouter.ai/api/v1/chat/completions` to use OpenRouter)
3. Run — input text goes in, humanized text comes out

The web UI is available at `http://localhost:8000`.

---

## Showcase — 5 Real Examples with Step-by-Step Outputs
Expand Down Expand Up @@ -264,4 +274,3 @@ MIT License. See [LICENSE](LICENSE) for details.
🌐 Visit official website [lynote.ai](https://lynote.ai) to unlock full premium features.

💬 Have questions, feature requests or usage troubles? Feel free to start a discussion in [Discussions](https://github.com/lynote-ai/humanize-text/discussions).

8 changes: 8 additions & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ temperature = 1.3
# restructuring before reconstruction to the target language.
# Other tested options: "de" (German), "ko" (Korean)
intermediate_lang = "fi"
# Step 4 provider: "niutrans" | "libretranslate"
step4_provider = "niutrans"

[providers.libretranslate]
# Self-hosted LibreTranslate endpoint (used when pipeline.step4_provider = "libretranslate")
base_url = "http://host.docker.internal:5000"
api_key = ""
timeout_sec = 60
31 changes: 29 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
version: '3.8'

services:
ai-humanizer:
build:
context: .
dockerfile: docker/Dockerfile
# Security: API routes are currently unauthenticated.
# Do not expose this port to the public internet.
# Deploy behind a reverse proxy and restrict access with firewall/private network.
ports:
- "8000:8000"
volumes:
- ./config:/app/config
environment:
- CONFIG_PATH=/app/config/config.toml
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/v1/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"

# Optional Option B: hot-reload Vite dev server inside Docker.
# Start with: docker compose --profile frontend up -d
frontend:
image: oven/bun:latest
working_dir: /app/frontend
profiles:
- frontend
ports:
- "5173:5173"
volumes:
- ./frontend:/app/frontend
environment:
# Point the Vite proxy at the backend service in the Docker network.
- API_HOST=http://ai-humanizer:8000
command: ["sh", "-c", "bun install && bun dev"]
depends_on:
- ai-humanizer
20 changes: 18 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
FROM python:3.11-slim
# Stage 1: Build Svelte frontend with Bun
FROM oven/bun:latest AS frontend

WORKDIR /app/frontend

COPY frontend/package.json ./
RUN bun install

COPY frontend/ ./
RUN bun run build

# Stage 2: Python application
FROM python:3.11-slim AS app

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install "fastapi>=0.109.0" "uvicorn[standard]>=0.27.0" "pydantic>=2.0.0"

COPY . .

# Copy the compiled frontend into /app/static so FastAPI can serve it
COPY --from=frontend /app/frontend/dist /app/static

EXPOSE 8000

CMD ["uvicorn", "src.methodologies.humanizer:app", "--host", "0.0.0.0", "--port", "8000"]
CMD ["uvicorn", "src.api:app", "--host", "0.0.0.0", "--port", "8000"]
39 changes: 39 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Dependencies
node_modules/
.pnp
.pnp.js

# Lockfiles (choose one per environment)
# bun.lock
# yarn.lock
# package-lock.json
# pnpm-lock.yaml

# Build output
dist/
build/
*.local

# Vite / Vitest
.vite/
coverage/

# Environment files
.env
.env.local
.env.*.local

# Editor / OS
.DS_Store
Thumbs.db
*.swp
*.swo
.vscode/
.idea/

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
Loading