Spaces:
Sleeping
Sleeping
| title: Decomate | |
| emoji: ⚡ | |
| colorFrom: red | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.38.2 | |
| app_file: app.py | |
| pinned: false | |
| license: cc-by-nc-3.0 | |
| ## 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. | |
| ## 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 | |
| 1. Clone the repository: | |
| ```bash | |
| git clone https://github.com/your-repo/decomate.git | |
| cd decomate | |
| ``` | |
| 2. Install dependencies: | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 3. Set up environment variables: | |
| - Create a `.env` file in the root directory. | |
| - Add your `ANTHROPIC_API_KEY`: | |
| ``` | |
| ANTHROPIC_API_KEY=your_api_key_here | |
| ``` | |
| ## Usage | |
| 1. Launch the application: | |
| ```bash | |
| python app.py | |
| ``` | |
| 2. Open the Gradio interface in your browser. | |
| 3. 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. | |
| - **`prompt_template/`**: Templates for AI prompts. | |
| - **`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 3.0 License. See the `LICENSE` file for details. | |
| ## Acknowledgments | |
| - **Gradio**: For providing an intuitive interface for machine learning applications. | |
| - **Anthropic**: For enabling advanced language model capabilities. | |
| - **CairoSVG**: For SVG to PNG conversion. | |