A web service for Haiku generation from text or from images and Haiku sharing https://senju1337.github.io/senju/
Find a file
2025-03-28 12:35:01 +01:00
.github chore: rename code coverage ci for a more descriptive name 2025-03-27 11:07:40 +01:00
docs chore: update sphinx conf for authors and copyright 2025-03-27 16:00:01 +01:00
requirements docs: components 2025-03-21 15:08:20 +01:00
senju fix: Remove unused import 2025-03-28 12:30:40 +01:00
tests test: add more edgecase tests for the store manager 2025-03-23 17:35:31 +01:00
.coveragerc refactor: Apply precommit autochanges 2025-03-21 16:27:28 +01:00
.dockerignore feat/OPS-61: add basic documentation 2025-03-14 16:53:44 +01:00
.gitignore chore: ignore the lock file 2025-03-23 19:00:01 +01:00
.pre-commit-config.yaml chore: add autopep and flake to pre commits 2025-02-07 16:04:30 +01:00
CHANGELOG.md chore(master): release 0.1.1 2025-03-28 12:32:51 +01:00
coverage.sh feat/OPS-31: added coverage feature 2025-03-12 19:20:38 +01:00
docker-compose.yml feat: deploy a production level webserver with docker 2025-03-23 18:59:39 +01:00
Dockerfile Merge branch 'devel' into feat/OPS-85 2025-03-26 23:08:58 +01:00
entrypoint.sh feat: deploy a production level webserver with docker 2025-03-23 18:59:39 +01:00
LICENSE docs: add GPL-3 license 2025-03-27 16:18:46 +01:00
poetry.lock Merge branch 'devel' into feat/OPS-85 2025-03-26 23:08:58 +01:00
pyproject.toml chore(master): release 0.1.1 2025-03-28 12:32:51 +01:00
README.md fix: Remove back to home button, set DB Path and change Haiku view title 2025-03-28 12:25:05 +01:00
run.sh feat: basic flask website 2025-02-08 18:23:32 +01:00

senju logo

千手 Senju

🎋 Poetry in Motion 🎎

A web service for Haiku generation from text or from images and Haiku sharing


Code Coverage Tests Status License Release
Python Versions Powered by Flask AI PyTorch

🌊 Overview

Senju (千手, "thousand hands") is a web service for haiku poetry generation and sharing, with image-to-haiku functionality.

Features

  • 🎏 AI-Powered Haiku Generation: Create beautiful three-line haiku poetry from text prompts
  • 🖼️ Image-to-Haiku: Turn uploaded images into poetic haiku (experimental)
  • 🔍 Display Haiku: View your previously generated haiku
  • 💾 Persistent Storage: All generated haiku are stored for future retrieval
  • 🖥️ Web Interface: Clean, efficient, minimalist user experience for human interaction
  • 👂 Accessibility: Text-to-speech integration for haikus

🔧 Installation

# Clone the repository
git clone https://github.com/senju1337/senju.git
cd senju

docker compose up

Docker desktop users on windows might need to change the line seperator from CRLF to LF of the file entrypoint.sh

📋 Dependencies

  • Python
  • Flask
  • TinyDB
  • PyTorch
  • Transformers
  • Pillow

See pyproject.toml for a complete list of dependencies.

Text To Speech

The speech synthesis uses the functionalities of your Operating System. Depending on your System, you might need to install additional software to use speech synthesis. On Debian GNU/Linux, you need to do the following:

apt install espeakup speech-dispatcher

Senju uses window.speechSynthesis for TTS.

🏯 Architecture

Senju is built around several key components:

  • Flask Application: Core web framework providing routing and template rendering
  • Haiku Generator: Interfaces with a machine learning model for poetry creation
  • Image Recognition: Vision-language model for extracting descriptions from images
  • Storage Manager: TinyDB-based persistence layer for haiku retrieval and storage

📝 Documentation

Senju is documented with sphinx. The documentation of the latest release is available on github-pages.

It can be generated like this (after installing the dependencies, see above):

cd docs
bash auto_docu.sh
# now open the documentation with a web browser of your choice
firefox ./build/html/

🧪 Testing

# Run tests
pytest

# Run tests with coverage
bash coverage.sh

📜 License

Distributed under the GPL-3 License. See LICENSE for more information.

🙏 Acknowledgements


Purple petals rise
Defying fragile beauty
Fiercely breathing life