A new package that enables users to input textual descriptions of visual design, layout, or interface concepts and returns structured representations or annotations derived from the description. It le
Project description
text2design
A package for converting textual descriptions of visual design, layout, or interface concepts to structured representations or annotations.
Overview
This package enables users to input textual descriptions of visual design, layout, or interface concepts and returns structured representations or annotations derived from the description. It leverages language model interactions coupled with pattern matching to extract key elements such as components, relationships, and attributes, facilitating tasks like generating structured design tokens, verifying design specifications, or creating markup descriptions.
Installation
pip install text2design
Usage
from text2design import text2design
response = text2design(user_input="a description of the design")
You can also use a langchain LLM instance instead of the default ChatLLM7 instance:
from langchain_openai import ChatOpenAI
from text2design import text2design
llm = ChatOpenAI()
response = text2design(user_input="a description of the design", llm=llm)
Input Parameters
user_input: str, the user input text to processllm: Optional[BaseChatModel], the langchain LLM instance to use, defaults toChatLLM7api_key: Optional[str], the api key forLLM7, can be set via environment variableLLM7_API_KEYor passed directly
Supported LLMs
This package uses ChatLLM7 from langchain_llm7 by default. You can pass your own LLM instance, for example:
- OpenAI:
from langchain_openai import ChatOpenAI
from text2design import text2design
llm = ChatOpenAI()
response = text2design(user_input, llm=llm)
- Anthropic:
from langchain_anthropic import ChatAnthropic
from text2design import text2design
llm = ChatAnthropic()
response = text2design(user_input, llm=llm)
- Google Generative AI:
from langchain_google_genai import ChatGoogleGenerativeAI
from text2design import text2design
llm = ChatGoogleGenerativeAI()
response = text2design(user_input, llm=llm)
API Key and Rate Limits
The default free tier for LLM7 is sufficient for most use cases. For higher rate limits:
- Set your API key via environment variable
LLM7_API_KEY - Or pass it directly:
text2design(user_input, api_key="your_api_key")
You can register for a free API key at https://token.llm7.io/.
Support and Issues
For issues or feature requests, please visit: https://github....
Author
- Eugene Evstafev (hi@eugene.plus)
- GitHub: chigwell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file text2design-2025.12.21154002.tar.gz.
File metadata
- Download URL: text2design-2025.12.21154002.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
073c99db126cb68ee7c95dd74c7c2c4e0ea705cc169812fd74008c5d9fa4f684
|
|
| MD5 |
ac3e7d67ace19b60a968e482af6157b6
|
|
| BLAKE2b-256 |
c98753ec6bc54ad5bc4b6926f5d38d75b3c50c713b5ea7755dc363f224d3b2bb
|
File details
Details for the file text2design-2025.12.21154002-py3-none-any.whl.
File metadata
- Download URL: text2design-2025.12.21154002-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6c55cc90a98c5cd6f718d6277856c794818fb0067a0e49e5125be428ef8dfc0
|
|
| MD5 |
0ee3a4a0713e4c34f812a26c7e85920a
|
|
| BLAKE2b-256 |
6fe66df472e1d743e9882ca7f6f9a7c06a8edc7a9e2582846f9c2a77a05a037c
|