Spaces:
Build error
Build error
|
Download README.md from Samidha21/moodify-ai: direct link, hf CLI and curl.
- Browser
- Download file 3.26 kB
-
https://huggingface.co/spaces/Samidha21/moodify-ai/resolve/main/README.md
- Command line
-
hf download hf://spaces/Samidha21/moodify-ai/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Samidha21/moodify-ai/resolve/main/README.md
3.26 kB
| title: Moodify AI | |
| emoji: ๐ต | |
| colorFrom: pink | |
| colorTo: yellow | |
| sdk: streamlit | |
| sdk_version: 1.31.1 | |
| app_file: frontend/app.py | |
| pinned: false | |
| # ๐ต Moodify AI | |
| AI-powered music generation and remixing platform that creates and transforms audio based on moods and genres. | |
|    | |
| ## โจ Features | |
| - **๐ผ Generate Music** - Create original tracks from mood, genre, and text prompts | |
| - **๐ Remix Audio** - Transform existing audio to match different moods | |
| - **๐ Analyze Audio** - Extract detailed audio features and characteristics | |
| - **๐จ Beautiful UI** - Intuitive Streamlit interface with custom styling | |
| ## ๐ Quick Start | |
| ```bash | |
| # Clone and setup | |
| git clone https://github.com/yourusername/moodify-ai.git | |
| cd moodify-ai | |
| python -m venv venv | |
| source venv/bin/activate # or venv\Scripts\activate on Windows | |
| pip install -r requirements.txt | |
| # Terminal 1 - Start Backend | |
| cd backend | |
| uvicorn main:app --reload --host 127.0.0.1 --port 8000 | |
| # Terminal 2 - Start Frontend | |
| cd frontend | |
| streamlit run app.py | |
| ``` | |
| Open `http://localhost:8501` in your browser. | |
| ## ๐ Project Structure | |
| ``` | |
| moodify-ai/ | |
| โโโ backend/ | |
| โ โโโ main.py # FastAPI server | |
| โ โโโ requirements.txt #backend-only | |
| โโโ frontend/ | |
| โ โโโ app.py # Streamlit UI | |
| โโโ requirements.txt # Dependencies frontend-only | |
| โโโ venv/ # Virtual environment | |
| ``` | |
| ## ๐ง Tech Stack | |
| - **Backend**: FastAPI, PyTorch, Transformers (MusicGen), Librosa | |
| - **Frontend**: Streamlit, Matplotlib | |
| - **Audio**: Librosa, SoundFile, NumPy | |
| ## ๐ก API Endpoints | |
| | Endpoint | Method | Description | | |
| |----------|--------|-------------| | |
| | `/generate` | POST | Generate new music | | |
| | `/remix` | POST | Remix existing audio | | |
| | `/analyze` | POST | Analyze audio features | | |
| | `/moods` | GET | List available moods | | |
| API docs: `http://localhost:8000/docs` | |
| ## ๐ฎ Usage | |
| **Generate Music:** | |
| 1. Select mood and genre | |
| 2. Add text description (optional) | |
| 3. Set duration (5-30 seconds) | |
| 4. Click "Generate Music" | |
| **Remix Audio:** | |
| 1. Upload audio file (WAV/MP3/OGG) | |
| 2. Choose target mood | |
| 3. Click "Remix Audio" | |
| **Analyze Audio:** | |
| 1. Upload audio file | |
| 2. Click "Analyze Audio" | |
| 3. View extracted features | |
| ## โ ๏ธ Important Notes | |
| - First run downloads MusicGen model (~2.5 GB) - cached for reuse | |
| - Backend must run before frontend | |
| - FFmpeg required for audio processing | |
| - GPU recommended for faster generation | |
| ## ๐ Troubleshooting | |
| **Connection refused:** Ensure backend is running on port 8000 | |
| **Module not found:** Activate venv and reinstall: `pip install -r requirements.txt` | |
| **Slow generation:** Normal on CPU (2-5 min). Use GPU for faster results (10-30s) | |
| ## Requirements Structure | |
| The project uses separate dependency files for frontend and backend. | |
| - Root `requirements.txt` โ Frontend (Streamlit Cloud) | |
| - `backend/requirements.txt` โ Backend (FastAPI + MusicGen) | |
| This separation avoids cloud deployment limitations and follows standard ML system design. | |
| For technical documentation, see [DOCUMENTATION.md](DOCUMENTATION.md) |