diffsketcher / README.md
jree423's picture
Update: Add text-to-image model card with widget
8613050 verified
|
raw
history blame
1.3 kB
---
license: mit
tags:
- text-to-image
- svg
- vector-graphics
pipeline_tag: text-to-image
widget:
- text: "a beautiful mountain landscape"
example_title: "Mountain Landscape"
- text: "a cute cat sitting on a windowsill"
example_title: "Cat on Windowsill"
- text: "a futuristic city skyline at sunset"
example_title: "Futuristic City"
---
# Vector Graphics Model
This model generates vector graphics (SVG) from text prompts.
## Usage
```python
import requests
API_URL = "https://api-inference.huggingface.co/models/jree423/diffsketcher"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
# Text-to-image input
output = query({
"inputs": "a beautiful mountain landscape",
})
# The response contains:
# - svg: The SVG content as a string
# - svg_base64: The SVG content encoded as base64
# - png_base64: A PNG version of the SVG encoded as base64
```
## Model Details
This model generates vector graphics (SVG) from text prompts. It produces clean, scalable vector graphics that can be used in various applications.
## Limitations
This is a placeholder implementation that returns simple SVG graphics. The full model implementation will be added in the future.