mirror of
https://github.com/senju1337/senju.git
synced 2025-12-23 23:39:27 +00:00
A web service for Haiku generation from text or from images and Haiku sharing
https://senju1337.github.io/senju/
|
|
||
|---|---|---|
| .github | ||
| docs | ||
| requirements | ||
| senju | ||
| tests | ||
| .coveragerc | ||
| .dockerignore | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| coverage.sh | ||
| docker-compose.yml | ||
| Dockerfile | ||
| entrypoint.sh | ||
| LICENSE | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
| run.sh | ||
千手 Senju
🎋 Poetry in Motion 🎎
A web service for Haiku generation from text or from images and Haiku sharing
🌊 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)
- 🔍 Browse Existing Haiku: Gallery view of previously generated poetry
- 💾 Persistent Storage: All generated haiku are stored for future retrieval
- 🖥️ Web Interface: Clean, efficient, minimalist user experience for human interaction
🔧 Installation
# Clone the repository
git clone https://github.com/senju1337/senju.git
cd senju
docker compose up
📋 Dependencies
- Python
- Flask
- TinyDB
- PyTorch
- Transformers
- Pillow
See pyproject.toml for a complete list of dependencies.
🏯 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
- Ollama for providing the AI backend
- BLIP for the image captioning model
- PyTorch and Transformers for ML infrastructure
- Flask for the web framework
- TinyDB for the document database
Purple petals rise
Defying fragile beauty
Fiercely breathing life
Defying fragile beauty
Fiercely breathing life