Spaces:
Sleeping
Sleeping
fix: app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,12 @@ from model import MusicLSTM
|
|
6 |
from train import DataLoader, Config, generate_song as generate_ABC_notation
|
7 |
from utils import load_vocab
|
8 |
from convert import abc_to_audio
|
|
|
9 |
|
10 |
class GradioApp():
|
11 |
def __init__(self):
|
12 |
# Set up configuration and data
|
|
|
13 |
self.config = Config()
|
14 |
self.CHECKPOINT_FILE = "checkpoint/model.pth"
|
15 |
self.data_loader = DataLoader(self.config.INPUT_FILE, self.config)
|
|
|
6 |
from train import DataLoader, Config, generate_song as generate_ABC_notation
|
7 |
from utils import load_vocab
|
8 |
from convert import abc_to_audio
|
9 |
+
import subprocess
|
10 |
|
11 |
class GradioApp():
|
12 |
def __init__(self):
|
13 |
# Set up configuration and data
|
14 |
+
subprocess.run(['./setup.sh'], check=True)
|
15 |
self.config = Config()
|
16 |
self.CHECKPOINT_FILE = "checkpoint/model.pth"
|
17 |
self.data_loader = DataLoader(self.config.INPUT_FILE, self.config)
|
app.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
libfluidsynth-dev
|
2 |
libsndfile1
|
3 |
abc2midi
|
4 |
-
RUN apt-get update && apt-get install -y abc2midi
|
|
|
1 |
libfluidsynth-dev
|
2 |
libsndfile1
|
3 |
abc2midi
|
4 |
+
RUN apt-get update && apt-get install -y abc2midi
|
setup.sh
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#! /bin/bash
|
2 |
+
|
3 |
+
# Install system-level dependencies
|
4 |
+
apt-get update
|
5 |
+
apt-get install -y fluidsynth
|
6 |
+
apt-get install -y abc2midi
|