CoolFace
Apppublic

Agents-MCP-Hackathon/plantuml-agent

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
App README

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 Diagram

Setup and Installation

To set up and run the PlantUML Agent locally, follow these steps:

  1. 1.Clone the repository:
bash
    git clone <repository_url>
    cd project_directory
  1. 1.Create a conda environment:
bash
    conda create -n plantuml-agent python=3.13 --y
    conda activate plantuml-agent
  1. 1.Install dependencies:

Install the required Python packages using pip:

bash
    pip install -r requirements.txt

Usage

To start the PlantUML Agent application, run the app.py file:

bash
python app.py