Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.1.0
metadata
title: Decomate
emoji: π
colorFrom: gray
colorTo: purple
sdk: gradio
sdk_version: 5.44.1
app_file: app.py
pinned: false
license: cc-by-nc-4.0
short_description: SVG decomposition and animation generation
Overview
Decomate is a Gradio-based application designed for intelligent SVG decomposition and animation generation. It leverages advanced machine learning models to analyze SVG files, group elements semantically, and create animations based on user descriptions.
Example Animation Result
![]() |
![]() |
|---|---|
| Bunny | Duck |
Features
- SVG Decomposition: Automatically parse and decompose SVG files into semantic groups such as characters, objects, and backgrounds.
- Animation Suggestions: Generate animation ideas tailored to the SVG structure.
- Interactive UI: User-friendly interface for uploading SVGs, analyzing them, and previewing animations.
- Custom Animation: Create animations using AI-driven suggestions and user inputs.
Installation
Clone the repository:
git clone https://github.com/your-repo/decomate.git cd decomateInstall dependencies:
pip install -r requirements.txtSet up environment variables:
- Create a
.envfile in the root directory. - Add your
ANTHROPIC_API_KEY:ANTHROPIC_API_KEY=your_api_key_here
- Create a
Usage
Launch the application:
python app.pyOpen the Gradio interface in your browser.
Upload an SVG file or paste SVG markup to start analyzing and animating.
File Structure
app.py: Main application file.utils.py: Utility functions for SVG processing.requirements.txt: List of dependencies.prompts/: Prompt Templates.dataset/: Sample SVG files for testing..env: Environment variables (not included in the repository).
License
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).

