This project consists of a frontend and a backend for generating music based on emotional input. The backend is powered by FastAPI, and the frontend is built with React.
- Node.js and npm: Required to run the frontend.
- Python 3.8+: Required to run the backend.
- Conda: Recommended for managing Python environments.
-
Install Python Dependencies: Run:
pip install requirements.txt
-
Install FluidSynth
- This project uses
fluidsynthto convert MIDI files to audio. Install it using:
brew install fluid-synthDownload from: https://github.com/FluidSynth/fluidsynth/releases
Extract and add the folder with fluidsynth.exe to your system PATH
Restart your terminal or IDE- Run the Backend:
Ensure you are in the project root directory and run:
uvicorn api_cache:app --reload
-
Navigate to the Frontend Directory:
cd frontend -
Install Node.js Dependencies: Run the following command to install the necessary packages:
npm install
-
Run the Frontend: Start the React development server with:
npm start
This will open the frontend in your default web browser, typically running on
http://localhost:3000.
- Access the Frontend: Open your web browser and go to
http://localhost:3000. - Interact with the Backend: The frontend will communicate with the backend to generate music based on the input provided.
- Ensure that both the frontend and backend are running simultaneously for the application to function correctly.
