RAG Chatbot Deployment on Streamlit Cloud: Lessons Learned

🚀 I built a RAG chatbot and deployed it on Streamlit Cloud — here's what broke (and how I fixed it) A few days ago I finished building my own RAG (Retrieval Augmented Generation) chatbot using a stack I'm genuinely proud of: 🔹 Sentence Transformers for embeddings 🔹 FAISS for vector search 🔹 LangChain for text splitting 🔹 PyPDF for document ingestion 🔹 Streamlit for the frontend Looked great locally. Pushed to GitHub. Clicked deploy on Streamlit Cloud. And then… 💥 it broke. The error? Failed to build pillow — RequiredDependencyException: zlib Streamlit Cloud was running Python 3.14 — a very new version. Pillow 10.4.0 had no pre-built binary wheel for it, so pip tried to compile from source and failed because the zlib system library was missing on the server. One small version pin in requirements.txt was silently killing the entire deployment. The fix? Three line changes in requirements.txt: ✅ pillow 10.4.0 → 11.2.1 ✅ numpy 1.26.4 → 2.0+ ✅ streamlit 1.39.0 → 1.40+ That's it. No code changes. No architecture changes. Just dependency hygiene. What I learned: 💡 Always check if your pinned packages have pre-built wheels for the Python version your cloud platform runs 💡 Old version pins feel safe but they quietly create compatibility landmines 💡 AI tools like Codex can fix, commit and push these changes in seconds — so there's no excuse not to keep dependencies updated Building in public, breaking things, and learning fast. That's the process. 🛠️ If you're building RAG apps or deploying ML projects on Streamlit, drop a comment — happy to share more about the architecture. #Python #MachineLearning #RAG #LLM #Streamlit #AIEngineering #BuildInPublic #SoftwareDevelopment #Developer

To view or add a comment, sign in

Explore content categories