plantuml-agent / README.md
savi8sant8s's picture
Update README.md
494ba7e verified

A newer version of the Gradio SDK is available: 5.34.2

Upgrade
metadata
tags:
  - agent-demo-track
title: Plantuml Agent
emoji: 🦀
colorFrom: gray
colorTo: pink
sdk: gradio
sdk_version: 5.33.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Generate UML diagrams from natural language description
hf_oauth: true
hf_oauth_scopes:
  - inference-api

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

PlantUML Agent

PlantUML Agent Logo

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. Clone the repository:

    git clone <repository_url>
    cd project_directory
    
  2. Create a conda environment:

    conda create -n plantuml-agent python=3.13 --y
    conda activate plantuml-agent
    
  3. Install dependencies:

    Install the required Python packages using pip:

    pip install -r requirements.txt
    

Usage

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

python app.py