plantuml-agent / README.md
savi8sant8s's picture
Added huggingface inference configuration
98fd32e
|
raw
history blame
2.5 kB
metadata
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 PlantUML 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

Objective

The PlantUML Agent is an interactive tool that leverages Large Language Models (LLMs) to generate PlantUML diagrams from natural language descriptions. 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 plain English, which the agent then translates into PlantUML code and visualizes in real-time.

Features

  • Natural Language to PlantUML: Convert descriptive text into PlantUML code.
  • Real-time Visualization: See your PlantUML diagrams rendered instantly as SVG images.
  • Examples: Explore pre-defined examples for various diagram types to understand the capabilities.
  • Retriever-Augmented Generation (RAG): Utilizes a retriever tool to search the PlantUML Language Reference Guide, enhancing the agent's ability to generate accurate and complex diagrams.

Agent Flow

User Input -> Retriever Tool -> LLM -> PlantUML Code -> Diagram Output

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.10 --y
    conda activate plantuml-agent
    
  3. Install dependencies:

    Install the required Python packages using pip:

    pip install -r requirements.txt
    
  4. Download the PlantUML Language Reference Guide:

    Ensure you have the PlantUML_Language_Reference_Guide_en.pdf file in the root directory of your project. This PDF is crucial for the RetrieverTool to function correctly. If you don't have it, you'll need to download it and place it in the project's root.

Usage

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

python app.py

Preview

Preview