Skip to content

jgordley/MermaidGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MermaidGPT

A simple Streamlit app that turns text prompts into Mermaid.js diagrams using OpenAI, Anthropic, or Gemini.

MermaidGPT Screenshot

Setup

git clone https://github.com/jgordley/MermaidGPT
cd MermaidGPT
pip install -r requirements.txt

Usage

streamlit run main.py
  1. Enter your OpenAI API key in the sidebar
  2. Select a chart type and orientation
  3. Describe what you want to diagram
  4. Click Generate

How it works

  • Your prompt is sent to OpenAI (gpt-4o) with instructions to return Mermaid.js markdown
  • The markdown is encoded and sent to mermaid.ink to render an image
  • The image is displayed in the app alongside the raw markdown

Files

main.py              # Streamlit app entry point
prompt.py            # OpenAI API call
mermaid.py           # Diagram rendering via mermaid.ink
components/
  sidebar.py         # API key input and app info

About

A simple ChatGPT and Mermaid.js integration that allows you to generate diagrams using natural language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages