Skip to main content

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

PyPI version License: MIT Downloads LinkedIn

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 process
  • llm: Optional[BaseChatModel], the langchain LLM instance to use, defaults to ChatLLM7
  • api_key: Optional[str], the api key for LLM7, can be set via environment variable LLM7_API_KEY or 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text2design-2025.12.21154002.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text2design-2025.12.21154002-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for text2design-2025.12.21154002.tar.gz
Algorithm Hash digest
SHA256 073c99db126cb68ee7c95dd74c7c2c4e0ea705cc169812fd74008c5d9fa4f684
MD5 ac3e7d67ace19b60a968e482af6157b6
BLAKE2b-256 c98753ec6bc54ad5bc4b6926f5d38d75b3c50c713b5ea7755dc363f224d3b2bb

See more details on using hashes here.

File details

Details for the file text2design-2025.12.21154002-py3-none-any.whl.

File metadata

File hashes

Hashes for text2design-2025.12.21154002-py3-none-any.whl
Algorithm Hash digest
SHA256 c6c55cc90a98c5cd6f718d6277856c794818fb0067a0e49e5125be428ef8dfc0
MD5 0ee3a4a0713e4c34f812a26c7e85920a
BLAKE2b-256 6fe66df472e1d743e9882ca7f6f9a7c06a8edc7a9e2582846f9c2a77a05a037c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page