Downloads · 30 days
0
evez420/unclaimable-20260610-aef83496b11bfa1b-hf
unclaimable-20260610-aef83496b11bfa1b-hf is a machine learning model from evez420. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository provides a simple MusicGen based service that can:
Downloads · 30 days
0
Access
Public
Updated Jun 10, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md3.1 KB · 30%
From the Hugging Face model README
This repository provides a simple MusicGen based service that can:
app.py) – loads the pretrained MusicGen model once and exposes a /generate endpoint.facebook/musicgen-medium checkpoint (requires ~4 GB VRAM for GPU, works on CPU albeit slower).librosa + matplotlib to create a spectrogram.index.html that sends a POST request to /generate and displays the audio player and spectrogram.Install dependencies
cd music_gen_service
python -m venv venv
source venv/bin/activate # on Windows use `venv\Scripts\activate`
pip install -r requirements.txt
Run the server
uvicorn app:app --host 0.0.0.0 --port 8000
The service will be reachable at http://localhost:8000 (or the host IP if you expose it).
Access from your phone
http://<host‑ip>:8000 in the browser on your Samsung Galaxy A16.You can call the endpoint directly from the assistant using exec (curl) or any HTTP client:
POST /generate
Content-Type: application/json
{
"prompt": "A calm, relaxing ambient instrumental track",
"duration": 30
}
The response contains two Base64 strings:
audio_base64 – a WAV audio file you can stream (data:audio/wav;base64,...).spectrogram_base64 – a PNG image of the mel‑spectrogram.If you prefer containerised deployment, a simple Dockerfile is provided:
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
Build and run:
docker build -t music-gen .
docker run -p 8000:8000 music-gen
model.to("cpu") to model.to("cuda") in app.py.musicgen-small, musicgen-large) by changing the names in the processor and model loading lines.Feel free to adapt the code, add authentication, or integrate it into larger workflows (e.g., OpenClaw can call the service, your phone can use the same endpoint).