Skip to content

Commit 82eb8e4

Browse files
committed
data into package
1 parent 98c6413 commit 82eb8e4

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
recursive-include mitdeeplearning/bin *
2+
recursive-include mitdeeplearning/data *

lab1/data/training_songs.pkl

-201 KB
Binary file not shown.
File renamed without changes.

mitdeeplearning/lab1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
from IPython.display import Audio
77

88

9-
DATA_URL = 'https://raw.githubusercontent.com/aamini/introtodeeplearning_labs/2019/lab1/data/irish.abc'
9+
cwd = os.path.dirname(__file__)
1010

1111
def load_training_data():
12-
stream = urllib.request.urlopen(DATA_URL)
13-
text = stream.read().decode("utf-8")
12+
with open(os.path.join(cwd, "data", "irish.abc"), "r") as f:
13+
text = f.read()
1414
songs = extract_song_snippet(text)
1515
return songs
1616

@@ -28,7 +28,7 @@ def save_song_to_abc(song, filename="tmp"):
2828
return filename
2929

3030
def abc2wav(abc_file):
31-
path_to_tool = os.path.join(os.path.dirname(__file__), 'bin', 'abc2wav')
31+
path_to_tool = os.path.join(cwd, 'bin', 'abc2wav')
3232
print("path_to_tool", path_to_tool)
3333

3434
cmd = "{} {}".format(path_to_tool, abc_file)

0 commit comments

Comments
 (0)