Spaces:
Sleeping
Sleeping
docs: update README.md
Browse files
README.md
CHANGED
|
@@ -10,4 +10,66 @@ pinned: false
|
|
| 10 |
license: cc-by-nc-3.0
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
license: cc-by-nc-3.0
|
| 11 |
---
|
| 12 |
|
| 13 |
+
## Overview
|
| 14 |
+
|
| 15 |
+
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.
|
| 16 |
+
|
| 17 |
+
## Features
|
| 18 |
+
|
| 19 |
+
- **SVG Decomposition**: Automatically parse and decompose SVG files into semantic groups such as characters, objects, and backgrounds.
|
| 20 |
+
- **Animation Suggestions**: Generate animation ideas tailored to the SVG structure.
|
| 21 |
+
- **Interactive UI**: User-friendly interface for uploading SVGs, analyzing them, and previewing animations.
|
| 22 |
+
- **Custom Animation**: Create animations using AI-driven suggestions and user inputs.
|
| 23 |
+
|
| 24 |
+
## Installation
|
| 25 |
+
|
| 26 |
+
1. Clone the repository:
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
git clone https://github.com/your-repo/decomate.git
|
| 30 |
+
cd decomate
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
2. Install dependencies:
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
pip install -r requirements.txt
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
3. Set up environment variables:
|
| 40 |
+
- Create a `.env` file in the root directory.
|
| 41 |
+
- Add your `ANTHROPIC_API_KEY`:
|
| 42 |
+
```
|
| 43 |
+
ANTHROPIC_API_KEY=your_api_key_here
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## Usage
|
| 47 |
+
|
| 48 |
+
1. Launch the application:
|
| 49 |
+
|
| 50 |
+
```bash
|
| 51 |
+
python app.py
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
2. Open the Gradio interface in your browser.
|
| 55 |
+
|
| 56 |
+
3. Upload an SVG file or paste SVG markup to start analyzing and animating.
|
| 57 |
+
|
| 58 |
+
## File Structure
|
| 59 |
+
|
| 60 |
+
- **`app.py`**: Main application file.
|
| 61 |
+
- **`utils.py`**: Utility functions for SVG processing.
|
| 62 |
+
- **`requirements.txt`**: List of dependencies.
|
| 63 |
+
- **`prompt_template/`**: Templates for AI prompts.
|
| 64 |
+
- **`dataset/`**: Sample SVG files for testing.
|
| 65 |
+
- **`.env`**: Environment variables (not included in the repository).
|
| 66 |
+
|
| 67 |
+
## License
|
| 68 |
+
|
| 69 |
+
This project is licensed under the Creative Commons Attribution-NonCommercial 3.0 License. See the `LICENSE` file for details.
|
| 70 |
+
|
| 71 |
+
## Acknowledgments
|
| 72 |
+
|
| 73 |
+
- **Gradio**: For providing an intuitive interface for machine learning applications.
|
| 74 |
+
- **Anthropic**: For enabling advanced language model capabilities.
|
| 75 |
+
- **CairoSVG**: For SVG to PNG conversion.
|