- All deployment tests pass (
python test_deployment.py) - App startup test passes (
python test_app_startup.py) - Fallback vector store test passes (
python test_fallback_store.py) - App runs locally without errors
- No syntax errors in Python files
- All imports resolve correctly
- No missing dependencies
- Proper error handling in place
-
requirements.txtcontains all necessary packages -
pysqlite3-binary>=0.5.0included for SQLite compatibility - All package versions are compatible with Python 3.13
- No conflicting package versions
- All changes committed and pushed
- Repository is public or accessible to Streamlit Cloud
- Main branch contains the latest code
- Go to share.streamlit.io
- Sign in with GitHub account
- Click "New app"
- Select repository:
karthiksuresh007/legal-research-assistant - Set branch:
main - Set main file path:
app.py
- Add
OPENAI_API_KEYwith your OpenAI API key - Add
GOOGLE_API_KEYwith your Google Gemini API key (orGEMINI_API_KEY) - Add
ANONYMIZED_TELEMETRY=False - Add
CHROMA_TELEMETRY_ENABLED=0
Note: The app will automatically use GOOGLE_API_KEY if GEMINI_API_KEY is not set.
- Click "Deploy"
- Wait for build to complete
- Check logs for any errors
- Test basic functionality
- Problem: "Gemini API key is required" error
- Solution: Set either
GOOGLE_API_KEYorGEMINI_API_KEYin Streamlit secrets - Check: Verify the API key is correctly set in Streamlit Cloud secrets
- Problem: Module not found errors
- Solution: Check that all files are in the correct directories
- Check: Run
python test_app_startup.pylocally
- Problem: ChromaDB SQLite version errors
- Solution: The app automatically falls back to FAISS vector store
- Check: Look for "Using fallback vector store" in logs
- Problem: Build fails during package installation
- Solution: Check
requirements.txtfor version conflicts - Check: Verify all packages are available for Python 3.13
- Problem: App crashes due to memory limits
- Solution: Consider upgrading to paid Streamlit Cloud tier
- Check: Monitor memory usage in Streamlit Cloud dashboard
After successful deployment, you should see:
✅ SQLite compatibility fix applied
✅ ChromaDB telemetry fixes applied
✅ Logging setup completed
✅ Main application imported successfully
✅ ChromaDB telemetry disabled
✅ Fallback vector store initialized with FAISS (if ChromaDB fails)
✅ API keys loaded successfully
- ✅ App loads without errors
- ✅ No telemetry errors in logs
- ✅ Document upload works
- ✅ Legal question answering works
- ✅ Vector store operations successful
- ✅ API keys are properly loaded
- Check Streamlit Cloud logs for specific error messages
- Verify environment variables are set correctly
- Test locally to ensure code works
- Check package versions for compatibility issues
Your Legal Research Assistant is now optimized for Streamlit Cloud deployment! 🚀