Spaces:
Sleeping
Sleeping
Commit
·
ce6b776
1
Parent(s):
d9f0ff3
updated python version
Browse files- Dockerfile +1 -1
- README.md +1 -0
- app.py +2 -2
- requirements.txt +16 -8
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Use an official Python image
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
|
|
|
| 1 |
# Use an official Python image
|
| 2 |
+
FROM python:3.11
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
README.md
CHANGED
|
@@ -9,6 +9,7 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
license: other
|
| 11 |
short_description: Anticipatory Music Transformer wrapped in HARP
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 9 |
pinned: false
|
| 10 |
license: other
|
| 11 |
short_description: Anticipatory Music Transformer wrapped in HARP
|
| 12 |
+
python_version: 3.11.11
|
| 13 |
---
|
| 14 |
|
| 15 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
import spaces # Enables ZeroGPU on Hugging Face
|
| 3 |
from transformers import AutoModelForCausalLM
|
| 4 |
from anticipation.sample import generate
|
| 5 |
from anticipation.convert import events_to_midi, midi_to_events
|
|
@@ -38,7 +38,7 @@ def load_amt_model(model_choice):
|
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
-
|
| 42 |
def generate_accompaniment(midi_file, model_choice, selected_midi_program, history_length):
|
| 43 |
"""Generates accompaniment for the entire MIDI input, conditioned on the user-selected history length."""
|
| 44 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
#import spaces # Enables ZeroGPU on Hugging Face
|
| 3 |
from transformers import AutoModelForCausalLM
|
| 4 |
from anticipation.sample import generate
|
| 5 |
from anticipation.convert import events_to_midi, midi_to_events
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
+
#@spaces.GPU
|
| 42 |
def generate_accompaniment(midi_file, model_choice, selected_midi_program, history_length):
|
| 43 |
"""Generates accompaniment for the entire MIDI input, conditioned on the user-selected history length."""
|
| 44 |
|
requirements.txt
CHANGED
|
@@ -1,9 +1,17 @@
|
|
| 1 |
-
# Standard dependencies
|
| 2 |
-
transformers
|
| 3 |
-
torch
|
| 4 |
-
numpy
|
| 5 |
-
midi2audio
|
| 6 |
-
pretty_midi
|
| 7 |
-
# Additional dependencies for AMT
|
| 8 |
-
git+https://github.com/jthickstun/anticipation.git
|
| 9 |
-e git+https://github.com/TEAMuP-dev/pyharp.git#egg=pyharp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
-e git+https://github.com/TEAMuP-dev/pyharp.git#egg=pyharp
|
| 2 |
+
demucs
|
| 3 |
+
dora-search
|
| 4 |
+
einops
|
| 5 |
+
julius>=0.2.3
|
| 6 |
+
lameenc>=1.2
|
| 7 |
+
openunmix
|
| 8 |
+
pyyaml
|
| 9 |
+
tqdm
|
| 10 |
+
torch>=1.8.1, <2.1
|
| 11 |
+
torchaudio>=0.8, <2.1
|
| 12 |
+
diffq>=0.2.1
|
| 13 |
+
ffmpeg
|
| 14 |
+
numpy<2
|
| 15 |
+
scipy
|
| 16 |
+
soundfile
|
| 17 |
+
hydra-core>=1.1
|