60 lines
1.5 KiB
Markdown
60 lines
1.5 KiB
Markdown
# Image Dataset Viewer
|
|
|
|
A simple Streamlit application to browse images from your Discord chat dataset.
|
|
|
|
## Features
|
|
|
|
- 📋 Dropdown to select different channels
|
|
- 🖼️ View images with navigation controls
|
|
- ⬅️➡️ Previous/Next buttons and slider navigation
|
|
- 📊 Display metadata for each image
|
|
- 📱 Responsive layout
|
|
|
|
## Setup and Usage
|
|
|
|
### Option 1: Using the run script (Recommended)
|
|
```bash
|
|
./run.sh
|
|
```
|
|
|
|
### Option 2: Manual setup
|
|
1. Create a virtual environment:
|
|
```bash
|
|
python3 -m venv venv
|
|
source venv/bin/activate
|
|
```
|
|
|
|
2. Install dependencies:
|
|
```bash
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
3. Run the application:
|
|
```bash
|
|
streamlit run image_viewer.py
|
|
```
|
|
|
|
## How it works
|
|
|
|
The application:
|
|
1. Loads the `images_dataset.json` file from the parent directory
|
|
2. Extracts unique channel names from the dataset
|
|
3. Allows you to select a channel from a dropdown
|
|
4. Displays images from that channel with navigation controls
|
|
5. Shows metadata including author, timestamp, and message content
|
|
|
|
## Dataset Structure
|
|
|
|
The app expects your dataset to have entries with:
|
|
- `channel`: The channel name
|
|
- `image_url`, `image_path`, `url`, or `attachment_url`: The image location
|
|
- `author`: The message author (optional)
|
|
- `timestamp`: When the message was sent (optional)
|
|
- `content` or `message`: The message text (optional)
|
|
|
|
## Troubleshooting
|
|
|
|
- If images don't load, check that the URLs in your dataset are accessible
|
|
- For local images, ensure the paths are relative to the project root
|
|
- Large datasets may take a moment to load initially
|