Generative AI-powered app to convert pictures and screenshots of hand-drawn sketches into professional diagrams with Mermaid.js.
- 📸 Upload images of hand-drawn diagrams or screenshots.
- 🤖 Generative AI-powered conversion to Mermaid.js format.
- 🎨 Professional styling and formatting according to brand style guide.
- 📊 Interact with live preview of generated diagrams.
- ⬇️ Export Mermaid.js code
- Python 3.9+
- Poetry
- OpenAI API key
- Clone the repository:
git clone https://github.com/yourusername/sketch-to-diagram.git
cd sketch-to-diagram- Install dependencies:
poetry install- Set up your environment:
cp .env.example .env
# Edit .env and add your OpenAI API key- Start the app:
poetry run streamlit run app/app.py-
Open your browser to the displayed URL (default http://localhost:8501)
-
Upload an image and click "Generate Mermaid Diagram"
Format code:
poetry run black app/Run linter:
poetry run flake8 app/Run tests:
poetry run pytest