Spaces:
Runtime error
A newer version of the Gradio SDK is available:
6.2.0
π Quick Start Guide
Get DReamMachine running in 5 minutes!
Step 1: Install Dependencies
pip install -r requirements.txt
Step 2: Set Up HuggingFace Token
Get your token from: https://huggingface.co/settings/tokens
Option A: Environment Variable
export HF_TOKEN=your_token_here
Option B: .env File
cp .env.example .env
# Edit .env and add your token
Step 3: Verify Setup
python setup.py
You should see all checks pass β
Step 4: Run Your First Dream!
Option A: Gradio Web Interface (Recommended)
python app.py
Then open: http://localhost:7860
- Go to "Single Dream Round" tab
- Keep the default stage "init_1_25"
- Click "π Run Dream Round"
- Wait 2-5 minutes
- Review the amazing results!
Option B: Command Line
python run_cli.py --single
What Happens During a Dream Round?
[A.1] Setup β Load prompts and constraints
[A.2] Dream β 3 LLMs generate creative ideas
[A.3] Refine β Writer/Logger/Narrator create narrative
[A.4] Analyze β Deep Thinker evaluates feasibility
[A.5] Score β Curator assigns final grades
[A.6] Log β Save to local files + HF Dataset
[A.7] Decide β Advance idea or start new one?
Takes 2-5 minutes depending on API response times.
Understanding Your Results
Session Summary
Originality: 9/10 β How novel is it?
Feasibility: 8/10 β Can it be built?
Global Impact: 9/10 β How many people benefit?
Narrative Coherence: 8/10 β Is the story good?
Reforge Flag: β Yes β Advances to next stage!
Reforge Flag = True means the idea was good enough to advance!
The Outputs
- Narrative Pitch - Compelling story about the invention
- Technical Components - What's needed to build it
- Feasibility Report - Scientific evaluation
- Curator Scorecard - Detailed scoring breakdown
Try Different Stages
Once you've run init_1_25 successfully:
# Try mid-life crisis stage
python run_cli.py --single --stage mid_26_50
# Try late-life adoption stage
python run_cli.py --single --stage late_51_75
# Try final legacy stage
python run_cli.py --single --stage final_76_100
Run Multiple Dreams (Batch Mode)
Via Web Interface
- Go to "Batch Mode" tab
- Set rounds: 5
- Set interval: 30 seconds
- Click "Run Batch Mode"
- Get coffee β (takes ~15 minutes)
Via CLI
# Run 5 rounds with 30-second intervals
python run_cli.py --batch 5 --interval 30
View Your Session History
Web Interface
- Go to "Session History" tab
- Click "π Refresh History"
- Browse all your past dreams!
File System
Check the logs/ directory:
ls logs/
# session_20250114_123045_0.json
# session_20250114_124512_1.json
# ...
Customize Configuration
Edit config.yaml to change:
- Models: Use different LLMs
- Constraints: Change what ideas must satisfy
- Thresholds: Adjust scoring requirements
- Prompts: Modify detail level
Common Issues
"HF_TOKEN not found" β Set the environment variable or add to .env file
"Rate limit exceeded"
β Add more sleep time between rounds
β Use --interval 60 for batch mode
"Model timeout" β Normal for large models, will retry automatically β Consider using smaller/faster models for testing
Next Steps
- Read the full README.md for advanced features
- Customize prompts in
prompt_manager.py - Deploy to HuggingFace Spaces for 24/7 dreaming
- Share your best discoveries!
Happy Dreaming! π