Agents-MCP-Hackathon/plantuml-agent
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
PlantUML Agent
<img src="https://repository-images.githubusercontent.com/553868400/2f7375d8-c2ee-44fe-81d0-a8a29ec284da" alt="PlantUML Agent Logo" width="200"/>
Powered by Mistral, BM25Retriever, LangChain, Docling, LRUCache, Gradio, and PlantUML.
Objective
The PlantUML Agent is an interactive tool that leverages Large Language Models (LLMs) to generate PlantUML diagrams from natural language descriptions and/or image scratches. It aims to simplify the creation of various UML diagrams (such as Use Case, Class, Sequence, Activity, and State Machine diagrams) by allowing users to describe their desired diagram in natural language, which the agent then translates into PlantUML code and visualizes in real-time.
Features
- Natural Language to PlantUML: Convert descriptive text or image scratch into PlantUML code.
- Real-time Visualization: See your PlantUML diagrams rendered instantly as SVG images.
- Retriever-Augmented Generation (RAG): Utilizes a retriever tool to search the PlantUML diagram information to enhance the generation process.
- Caching: Avoid redundant analyses with an LRU cache for improved performance.
Agent Flow
User Input Text -> User Input Image (optional) -> PlantUML Agent -> PlantUML Code + PlantUML DiagramSetup and Installation
To set up and run the PlantUML Agent locally, follow these steps:
- Clone the repository:
git clone <repository_url>
cd project_directory- Create a conda environment:
conda create -n plantuml-agent python=3.13 --y
conda activate plantuml-agent- Install dependencies:
Install the required Python packages using pip:
pip install -r requirements.txtUsage
To start the PlantUML Agent application, run the app.py file:
python app.py