A newer version of the Gradio SDK is available:
6.1.0
π Deployment Guide: ΧΧ¨ΧΧΧͺ to Hugging Face Spaces
This guide will help you deploy the ΧΧ¨ΧΧΧͺ (Mirrors) application to your Hugging Face Space.
π Pre-deployment Checklist
Files Ready for Upload:
- β
app.py- Main application (optimized for HF Spaces) - β
requirements.txt- Dependencies - β
README.md- Documentation - β
prompt_engineering.py- Hebrew personas module - β
conversation_manager.py- Session management - β
app_config.py- Configuration for HF deployment - β
.gitignore- Ignore unnecessary files
π Deployment Steps
Option 1: Git Upload (Recommended)
Clone your HF Space repository:
git clone https://huggingface.co/spaces/shim5/mirrors cd mirrorsCopy application files:
# Copy all the Python files cp /path/to/your/project/*.py . cp /path/to/your/project/requirements.txt . cp /path/to/your/project/README.md . cp /path/to/your/project/.gitignore .Commit and push:
git add . git commit -m "Deploy ΧΧ¨ΧΧΧͺ Hebrew Self-Reflective AI Agent" git push
Option 2: Direct Web Upload
- Go to https://huggingface.co/spaces/shim5/mirrors
- Click "Files" tab
- Upload each file individually:
app.pyrequirements.txtREADME.mdprompt_engineering.pyconversation_manager.pyapp_config.py
π§ HF Spaces Configuration
Your Space should be configured as:
- SDK: Gradio
- Python Version: 3.9+
- Hardware: CPU Basic (free tier)
- Visibility: Public
π― Expected Behavior
- Build Time: ~3-5 minutes for dependency installation
- First Load: May take 1-2 minutes to load the Hebrew model
- Fallback Mode: If model loading fails, app will run in demo mode
- Performance: Response time ~2-5 seconds per message
π Troubleshooting
Common Issues:
Build Fails:
- Check
requirements.txtformatting - Ensure all Python files are valid syntax
- Check
Model Loading Issues:
- App will automatically fall back to demo mode
- Check logs for specific errors
Hebrew Text Issues:
- Ensure browser supports RTL text
- Check CSS is loading correctly
Debug Mode:
To enable debug logging, modify app_config.py:
HF_SPACES_CONFIG = {
"debug": True,
# ... other settings
}
π Monitoring
After deployment:
- Check the build logs in HF Spaces
- Test the 3-step user flow
- Verify Hebrew text displays correctly
- Test conversation with different parts
π Success Indicators
β
App loads without errors
β
Hebrew interface displays correctly
β
All 5 psychological parts are selectable
β
Conversations flow smoothly
β
User can customize persona names
β
Session state persists during conversation
π Updates
To update the deployed app:
- Modify files locally
- Re-upload to HF Space
- Space will automatically rebuild
Ready to deploy! π