A newer version of the Streamlit SDK is available:
1.51.0
metadata
title: Gemini HTML/CSS Chatbot
emoji: π¬
colorFrom: yellow
colorTo: purple
sdk: streamlit
sdk_version: 1.32.0
app_file: app.py
pinned: false
license: apache-2.0
Gemini HTML/CSS Chatbot
This Streamlit app uses Gemini 2.5 Flash (via LangChain + Google Generative AI) to convert website UI screenshots into semantic, accessible, and responsive HTML + CSS code.
Features
- π Upload a screenshot of a website UI
- π§ Gemini 2.5 Flash analyzes the layout
- ποΈ Generates HTML5 with proper semantic tags
- π¨ Outputs CSS with Flexbox/Grid and media queries
- βΏ Adds accessibility (alt text, ARIA labels)
- π± Mobile-first responsive design
- β‘ Live typing animation just like ChatGPT
- π Runs entirely on Hugging Face Spaces
Tech Stack
| Component | Description |
|---|---|
| Streamlit | Web UI framework |
| LangChain | LLM orchestration |
| Gemini 2.5 Flash | Vision-language model by Google |
| BeautifulSoup | HTML parsing & cleanup |
| Pillow (PIL) | Image processing |
| cssutils | CSS parsing and selective rule handling |
Requirements
streamlit
Pillow
beautifulsoup4
cssutils
langchain
langchain-google-genai
google-generativeai