How kratoossss/text-to-image-converter works
Project type and purpose
• This is a single-container Streamlit web application (“PromptToImage Converter”) that exposes a browser-based UI, orchestrates a local LLM module for prompt expansion, invokes the Stability AI image-generation API, and returns downloadable images.
File structure
• Top level:
• .devcontainer/ – VS Code dev container config
• README.md – documentation
• requirements.txt – Python dependencies
• app/
• main.py – Streamlit UI entry-point and request handler
• llm_utils.py – encapsulates llama-cpp-python calls (prompt expansion)
• No separate “frontend” folder: Streamlit serves both UI and backend code.
README for additional insights
• The app loads environment variable STABILITY_API_KEY, lets the user pick an art style, optionally expands the prompt via Llama, then calls the Stability AI REST API to generate images.
• Key technologies: Python ≥3.8, Streamlit, llama-cpp-python, requests.