Fixed import statement with the usage of paths
Browse files
audio.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
import tensorflow as tf
|
3 |
import numpy as np
|
4 |
import pandas as pd
|
5 |
-
from model import VAE
|
6 |
|
7 |
# Audio
|
8 |
import pretty_midi
|
@@ -10,6 +9,16 @@ import pretty_midi
|
|
10 |
# Displaying
|
11 |
from IPython import display
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Extras
|
14 |
import collections
|
15 |
|
|
|
2 |
import tensorflow as tf
|
3 |
import numpy as np
|
4 |
import pandas as pd
|
|
|
5 |
|
6 |
# Audio
|
7 |
import pretty_midi
|
|
|
9 |
# Displaying
|
10 |
from IPython import display
|
11 |
|
12 |
+
# Get the absolute path of the directory and add it to sys.path in order to
|
13 |
+
# get the VAE class type
|
14 |
+
import sys
|
15 |
+
from pathlib import Path
|
16 |
+
|
17 |
+
directory = Path(__file__).resolve().parent
|
18 |
+
sys.path.insert(0, str(directory))
|
19 |
+
|
20 |
+
from model import VAE
|
21 |
+
|
22 |
# Extras
|
23 |
import collections
|
24 |
|