How deepshikha-chhaperia/green-thread-app works
Project type and purpose
• This is a full-stack, single-repo Python web application (“Green Thread”) built with Streamlit for the frontend and a lightweight Python backend.
• Purpose: Provide four AI-powered sustainable-fashion tools (Design Studio, Fabric Advisor, Production Optimizer, Textile Generator) plus a sustainability dashboard, combining local AI models (Stable Diffusion, ResNet50) with external APIs (Google Gemini).
File structure
• Top level:
• main.py – Entry point launching the Streamlit UI and routing between feature modules.
• design_studio.py, fabric_analyzer.py, sustainable_production_optimizer.py, sustainable_textile_generator.py, sustainability_dashboard.py – Business-logic modules for each feature.
• qr_code_id.py – Utility for generating QR code identifiers for designs.
• config.toml – Streamlit configuration (theme, server).
• requirements.txt & packages.txt – Python dependencies.
• .env.example – Placeholder for GEMINI_API_KEY and HF_API_TOKEN; loaded via python-dotenv.
• .devcontainer/ – VS Code dev-container configuration for reproducible environments.
• Implicit architectural choices:
• Monolithic Python service with modular feature scripts.
• Use of in-process function calls for AI tasks and optional Flask endpoints (per README) for API serving.
• SQLite3 as embedded database, Pandas for data manipulation.
• Caching (Streamlit’s @st.cache_resource, functools.lru_cache) and retry/backoff patterns for robustness.
README for insights
• Confirms the tech stack: Streamlit, Flask, SQLite3, Pandas, Stable Diffusion, ResNet50, Google Gemini.
• Highlights caching, attention slicing, exponential backoff—all important optimization layers to represent.
• Mentions a flowchart showing how user inputs traverse the system. Use that as a reference to produce your own.