Spaces:
Runtime error
Runtime error
File size: 3,606 Bytes
77a06d0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# π Quick Start Guide
Get DReamMachine running in 5 minutes!
## Step 1: Install Dependencies
```bash
pip install -r requirements.txt
```
## Step 2: Set Up HuggingFace Token
Get your token from: https://huggingface.co/settings/tokens
**Option A: Environment Variable**
```bash
export HF_TOKEN=your_token_here
```
**Option B: .env File**
```bash
cp .env.example .env
# Edit .env and add your token
```
## Step 3: Verify Setup
```bash
python setup.py
```
You should see all checks pass β
## Step 4: Run Your First Dream!
### Option A: Gradio Web Interface (Recommended)
```bash
python app.py
```
Then open: http://localhost:7860
1. Go to "Single Dream Round" tab
2. Keep the default stage "init_1_25"
3. Click "π Run Dream Round"
4. Wait 2-5 minutes
5. Review the amazing results!
### Option B: Command Line
```bash
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
1. **Narrative Pitch** - Compelling story about the invention
2. **Technical Components** - What's needed to build it
3. **Feasibility Report** - Scientific evaluation
4. **Curator Scorecard** - Detailed scoring breakdown
## Try Different Stages
Once you've run `init_1_25` successfully:
```bash
# 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
1. Go to "Batch Mode" tab
2. Set rounds: 5
3. Set interval: 30 seconds
4. Click "Run Batch Mode"
5. Get coffee β (takes ~15 minutes)
### Via CLI
```bash
# Run 5 rounds with 30-second intervals
python run_cli.py --batch 5 --interval 30
```
## View Your Session History
### Web Interface
1. Go to "Session History" tab
2. Click "π Refresh History"
3. Browse all your past dreams!
### File System
Check the `logs/` directory:
```bash
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](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! π**
|