Spaces:
Sleeping
Sleeping
File size: 2,013 Bytes
411f6c9 | 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 | # Cache Directory
This directory stores cached data for the AI Image Caption Generator.
## Directory Structure
```
cache/
βββ analytics.json # Usage statistics and analytics (git-ignored, auto-created)
βββ models/ # Cached ML models from Hugging Face (git-ignored)
βββ models--microsoft--git-large-coco/
βββ models--Salesforce--blip-image-captioning-base/
```
## What's Ignored
- `analytics.json`: Contains user-specific analytics data
- `models/`: Contains downloaded ML models (can be several GB)
- All other cache files
## What's Tracked
- `.gitkeep` files: Preserve directory structure in Git
- This README: Documentation for the cache directory
## Automatic Creation
**No manual setup required!** Both files and directories are created automatically:
- β
`analytics.json` is created automatically on first run with the correct structure
- β
`models/` directory is created automatically when models are downloaded
- β
The cache directory structure is preserved via `.gitkeep` files
### Analytics JSON Structure
The `analytics.json` file is automatically initialized with this structure:
```json
{
"total_captions": 0,
"style_usage": {
"None": 0,
"Professional": 0,
"Creative": 0,
"Social Media": 0,
"Technical": 0
},
"avg_processing_time": 0.0,
"total_processing_time": 0.0,
"model_usage": {
"blip": 0,
"git": 0
},
"error_count": 0,
"last_updated": null
}
```
**You don't need to create this file manually** - it will be generated automatically when the app runs for the first time.
## Notes
- The cache directory is automatically created by the application
- Models are downloaded on first use and cached here
- Analytics data is stored in `analytics.json` (created automatically)
- All cache contents are ignored by Git to avoid committing large files and user data
- Each user gets their own analytics.json file with their usage statistics
|