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
Metadata
Release files for text2design 2025.12.21154002
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| text2design-2025.12.21154002.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| text2design-2025.12.21154002-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / text2design-2025.12.21154002.tar.gz
| Download URL | text2design-2025.12.21154002.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
073c99db126cb68ee7c95dd74c7c2c4e0ea705cc169812fd74008c5d9fa4f684
|
|
BLAKE2b-256 checksum How to use checksums |
c98753ec6bc54ad5bc4b6926f5d38d75b3c50c713b5ea7755dc363f224d3b2bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / text2design-2025.12.21154002-py3-none-any.whl
| Download URL | text2design-2025.12.21154002-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6c55cc90a98c5cd6f718d6277856c794818fb0067a0e49e5125be428ef8dfc0
|
|
BLAKE2b-256 checksum How to use checksums |
6fe66df472e1d743e9882ca7f6f9a7c06a8edc7a9e2582846f9c2a77a05a037c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|