TomRB22 commited on
Commit
13c33d8
1 Parent(s): d118b8d

Fixed import statement with the usage of paths

Browse files
Files changed (1) hide show
  1. audio.py +10 -1
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