Spaces:
Sleeping
Sleeping
| # 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! π |