navred61's picture
copied from private space
99a41ea

A newer version of the Gradio SDK is available: 5.44.1

Upgrade

πŸš€ Quick Start Guide

Getting Started in 3 Steps

Step 1: Test Your Setup

python test_setup.py

This will verify all dependencies are working correctly.

Step 2: Start the Application

Option A: Use the batch file (Windows)

run.bat

Option B: Manual start

# Activate virtual environment
venv\Scripts\activate  # Windows
# or
source venv/bin/activate  # Linux/Mac

# Run the app
python app.py

Step 3: Access the Application

Claude Desktop Integration

Prerequisites

  1. Install Node.js from https://nodejs.org
  2. Install mcp-remote:
    npm install -g mcp-remote
    

Configuration

  1. Find your Claude Desktop config file:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Copy the contents of claude_config.json to your Claude config file

  3. Restart Claude Desktop

Testing Claude Integration

In Claude Desktop, try these prompts:

Generate a UML diagram for this Python code:

class Vehicle:
    def __init__(self, brand):
        self.brand = brand
    
    def start(self):
        pass

class Car(Vehicle):
    def start(self):
        return "Engine started"

or

Analyze the structure of this Python code:

class Calculator:
    def add(self, a, b):
        return a + b
    
    def multiply(self, a, b):
        return a * b

Troubleshooting

Common Issues

  1. Import errors when running test_setup.py:

    pip install -r requirements.txt
    
  2. Claude Desktop doesn't recognize the MCP server:

    • Check Node.js installation: node --version
    • Check mcp-remote installation: npx mcp-remote --version
    • Verify the app is running: visit http://127.0.0.1:7860
    • Restart Claude Desktop after config changes
  3. No diagram generated:

    • Ensure your Python code contains class definitions
    • Check for syntax errors in your code
    • Verify internet connection (PlantUML service)

Debug Commands

# Check if the app is running
curl http://127.0.0.1:7860/gradio_api/mcp/schema

# Test MCP endpoint
npx mcp-remote http://127.0.0.1:7860/gradio_api/mcp/sse --transport sse-only

Next Steps

  1. Try the sample code in the web interface
  2. Experiment with your own Python classes
  3. Test the MCP integration with Claude Desktop
  4. Explore the code analysis features

Happy diagramming! 🎨