Highlighting the core functionality: Transform Text" conveys the idea of inputting text and getting a visual output.2. Emphasizing the output: into Visual Masterpieces showcases the creative and visually appealing diagrams generated by the application.3. Showcasing the AI-driven technology: with AI Power hints at the use of advanced AI models (GPT-3.5-turbo) and APIs (OpenAI, Mermaid) that make this transformation possible.The slogan is concise, memorable, and engaging, making it perfect for promoting the project and piquing the interest of potential users and contributors.
Developed with the software and tools below.
Table of Contents
MermaidGPT is an innovative software project that empowers users to generate diagrams from text prompts through a seamless interface. By leveraging OpenAIs GPT-3.5-turbo model and the Mermaid API, MermaidGPT enables the creation of complex graph data visualizations with ease. The application provides a user-friendly interface, complete with a configurable sidebar, to facilitate input, processing, and rendering of diagrams. With MermaidGPT, users can effortlessly transform text into visually stunning diagrams, making it an invaluable tool for a wide range of applications, from technical documentation to data analysis and education.
Feature | Description | |
---|---|---|
โ๏ธ | Architecture | Monolithic design with 4 main modules: main, mermaid, prompt, and sidebar. Python-based, using OpenAI API and Mermaid API for diagram generation. |
๐ฉ | Code Quality | Well-structured code with clear variable names and modular functions. Could benefit from type hints and docstrings for improved readability. |
๐ | Documentation | Limited documentation, mostly in the form of inline comments. No README or separate documentation files. Could benefit from a comprehensive README and API documentation. |
๐ | Integrations | Integrates with OpenAI API (GPT-3.5-turbo model) and Mermaid API for diagram generation. |
๐งฉ | Modularity | Modular codebase with separate files for distinct functionality, making it easy to maintain and update individual components. |
๐งช | Testing | No testing frameworks or tools used. Could benefit from unit testing and integration testing to ensure functionality and catch errors. |
โก๏ธ | Performance | Performance is dependent on OpenAI API and Mermaid API responses. Could benefit from optimization techniques to improve response times. |
๐ก๏ธ | Security | OpenAI API key is stored in the code, which is a security risk. Should be stored as an environment variable or secure storage. |
๐ฆ | Dependencies | Depends on Python and Py, with external dependencies on OpenAI API and Mermaid API. |
๐ | Scalability | Currently designed for a single-user interface, may require significant changes to handle increased traffic and load. |
โโโ MermaidGPT/
โโโ components
โ โโโ sidebar.py
โโโ main.py
โโโ mermaid.py
โโโ prompt.py
.
File | Summary |
---|---|
main.py | Orchestrates the MermaidGPT application, providing a user interface for generating diagrams from text prompts. It sets up the layout, initializes the sidebar, and facilitates the interaction between user input, OpenAI API calls, and diagram rendering, ultimately displaying the generated image and markdown response. |
mermaid.py | Generates diagrams by encoding graph data and sending it to the Mermaid API, which returns an image that is then opened and returned as a PIL Image object, enabling visual representation of complex graph data within the MermaidGPT application. |
prompt.py | Transforms user input into a Mermaid.js formatted markdown chart by leveraging OpenAIs GPT-3.5-turbo model. It sets the OpenAI API key, generates a prompt, and sends a chat request to the model, ultimately returning a markdown graph that can be pasted into a Mermaid.js viewer. |
components
File | Summary |
---|---|
sidebar.py | Configures and personalizes the user interface by setting up an OpenAI API key input field and displaying essential information about the MermaidGPT application, including usage instructions, contributor links, and credits, in a conveniently accessible sidebar within the application. |
System Requirements:
- Python:
version x.y.z
- Clone the MermaidGPT repository:
$ git clone https://github.com/jgordley/MermaidGPT
- Change to the project directory:
$ cd MermaidGPT
- Install the dependencies:
$ pip install -r requirements.txt
Run MermaidGPT using the command below:
$ python main.py
Run the test suite using the command below:
$ pytest
-
โบ INSERT-TASK-1
-
โบ INSERT-TASK-2
-
โบ ...
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests for the
MermaidGPT
project. - Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/jgordley/MermaidGPT
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is protected under the SELECT-A-LICENSE License. For more details, refer to the LICENSE file.
- List any resources, contributors, inspiration, etc. here.