https://github.com/adityanandanx/kalam2
Kalam2 is a full-stack handwriting generation application. It consists of a FastAPI backend for generating SVG handwriting using machine learning, and a Next.js frontend for user interaction and visualization.
https://github.com/adityanandanx/kalam2
fastapi handwriting-synthesis nextjs rnn svg tensorflow
Last synced: about 2 months ago
JSON representation
Kalam2 is a full-stack handwriting generation application. It consists of a FastAPI backend for generating SVG handwriting using machine learning, and a Next.js frontend for user interaction and visualization.
- Host: GitHub
- URL: https://github.com/adityanandanx/kalam2
- Owner: adityanandanx
- Created: 2025-05-27T16:03:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-03T07:47:15.000Z (about 1 year ago)
- Last Synced: 2025-07-07T02:40:47.956Z (12 months ago)
- Topics: fastapi, handwriting-synthesis, nextjs, rnn, svg, tensorflow
- Language: Python
- Homepage:
- Size: 15.3 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: docs/README.md
Awesome Lists containing this project
README
Kalam2
Kalam2 is a full-stack handwriting generation application. It consists of a FastAPI backend for generating SVG handwriting using machine learning, and a Next.js frontend for user interaction and visualization.
## Features
- Generate realistic handwriting in multiple styles
- Download handwriting as SVG (including A4 page layout)
- Customizable style, color, and layout options
- API endpoints for integration
---
## Backend (FastAPI)
### Setup
1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/)
2. Install dependencies and activate virtual environment:
```bash
uv sync
source .venv/bin/activate
```
3. Start the backend server:
```bash
python main.py
```
The API will be available at `http://localhost:8000/api/v1`.
### Main Endpoints
- `POST /api/v1/handwriting/generate` — Generate handwriting from text lines
- `POST /api/v1/handwriting/a4page` — Generate handwriting formatted for A4 pages
- `GET /api/v1/handwriting/styles` — List available handwriting styles
- `GET /api/v1/handwriting/styles/{style_id}` — Get details and preview for a style
---
## Frontend (Next.js)
### Setup
1. Install Node.js.
2. Install dependencies:
```bash
pnpm install
# or
npm install
```
3. Start the development server:
```bash
pnpm dev
# or
npm run dev
```
The app will be available at `http://localhost:3000`.
### Usage
- Enter text and select a handwriting style to generate handwriting.
- Use the A4 page generator for multi-page output.
- Download generated SVGs for use in documents or printing.
---
## Deployment
- The frontend can be deployed on Vercel or any static hosting supporting Next.js.
- The backend can be deployed on any server supporting Python and FastAPI.
---
## License
MIT License
---
## Acknowledgements
- Built with FastAPI, Next.js, and TensorFlow.
- Handwriting model and styles are from https://github.com/sjvasquez/handwriting-synthesis.