Spaces:
Sleeping
Sleeping
File size: 2,127 Bytes
cf835ce b848414 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
---
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.
|