bytedance-1 / DIRECTORY_ACCESS_GUIDE.md
drdata's picture
Upload folder using huggingface_hub
3402506 verified
# BytePlus Image Generation Studio - Directory Access Guide
## βœ… Problem Resolved!
The `view_session/`, `Generated/`, and `static/` folders are now accessible. Here's what was done:
### πŸ”§ What Was Fixed
1. **Permission Issues**: The `.cache` directory had restrictive permissions (700) that prevented access
2. **Missing Directories**: The folders weren't created until the app actually generates images
3. **Path Confusion**: The folders exist inside the hidden `.cache` directory
### πŸ“ Directory Structure
```
/Users/data/SGS-1/
β”œβ”€β”€ .cache/ # Hidden cache (downloaded Hugging Face space)
β”‚ β”œβ”€β”€ Generated/ # Original generated images folder
β”‚ β”œβ”€β”€ static/ # Original static files folder
β”‚ β”œβ”€β”€ view_session/ # Original session viewer folder
β”‚ └── app.py # Downloaded BytePlus app
β”œβ”€β”€ Generated -> .cache/Generated # Symbolic link for easy access
β”œβ”€β”€ static -> .cache/static # Symbolic link for easy access
β”œβ”€β”€ view_session -> .cache/view_session # Symbolic link for easy access
β”œβ”€β”€ run_app.py # Helper script to run the app
└── check_directories.py # Script to check directory status
```
### πŸš€ How to Use
#### Option 1: Use the Helper Script (Recommended)
```bash
# Run the app with automatic setup
python run_app.py
# Or just setup directories without running
python run_app.py --setup-only
```
#### Option 2: Manual Commands
```bash
# Check directory status
python check_directories.py
# Run the downloaded app directly
cd .cache && python app.py
```
### πŸ“‚ Directory Functions
- **`Generated/`**: Stores generated images organized by session (e.g., `session_20240924_143052/`)
- **`static/`**: Contains static files served by the web interface (ZIP downloads, etc.)
- **`view_session/`**: Used by the web interface for session viewing functionality
### 🌐 Web Interface URLs
When the app is running, you can access:
- Main interface: `http://localhost:7860` (or the port shown in terminal)
- Session viewer: `http://localhost:7860/view_session/{timestamp}`
- Static files: `http://localhost:7860/static/filename.zip`
### πŸ› οΈ Troubleshooting
If you still can't access the directories:
1. **Check permissions**:
```bash
ls -la .cache
# Should show: drwxr-xr-x (755 permissions)
```
2. **Recreate symbolic links**:
```bash
python run_app.py --setup-only
```
3. **Check directory status**:
```bash
python check_directories.py
```
### πŸ“ Notes
- The directories will be empty until you actually generate images using the app
- Session folders are created with timestamps like `session_20240924_143052`
- ZIP files for downloads are automatically created in the `static/` folder
- The `view_session/` functionality allows viewing generated images via web browser
### πŸ”— Related Files
- `app.py` - Original loader script
- `.cache/app.py` - Downloaded BytePlus Image Generation Studio
- `run_app.py` - Helper script for running the app
- `check_directories.py` - Directory status checker
The directories are now fully accessible and the app is ready to use! πŸŽ‰