# Sudan-MM-2025 Automator
A Streamlit web application for automating multimodal data collection workflows. This app integrates with Google Drive and Google Sheets APIs to manage file uploads, sequential ID generation, folder organization, and metadata logging.
## Features
- **Dual Mode Support**: Upload images (.jpg, .jpeg, .png) or videos (.mp4)
- **Audio Captions**: Upload .mp3 voice captions for each media file
- **Bilingual Captions**: Support for Modern Standard Arabic (MSA) and Sudanese Arabic captions
- **Category Classification**: 10 predefined categories for organizing submissions
- **Automatic ID Generation**: Sequential IDs (img_1, img_2, vid_1, vid_2, etc.)
- **Smart File Organization**: Automatic routing to appropriate Google Drive folders
- **Metadata Logging**: Automatic logging to Google Sheets with separate tabs for Images and Videos
- **Validation**: Enforces video duration (3-10 seconds) and audio duration (5-15 seconds)
## Prerequisites
1. **Python 3.8+**
2. **Google Cloud Project** with:
- Google Drive API enabled
- Google Sheets API enabled
- Service account credentials JSON file
## Setup Instructions
### 1. Install Dependencies
```bash
pip install -r requirements.txt
```
**Note:** For audio validation, the app uses `mutagen` (recommended, no system dependencies) with `pydub` as a fallback. If you prefer using `pydub` exclusively, you may need to install `ffmpeg` separately on your system.
### 2. Set Up Shared Folder (REQUIRED)
**IMPORTANT**: Service accounts have very limited storage (15GB total across all service accounts). You MUST use a shared folder to avoid quota errors.
1. **Create or choose a folder** in your Google Drive where you want files to be stored
2. **Get your service account email**:
- Open `service_account_credentials.json`
- Find the `client_email` field (e.g., `your-service-account@project-id.iam.gserviceaccount.com`)
3. **Share the folder**:
- Right-click the folder in Google Drive → "Share"
- Paste the service …