juancopi81 commited on
Commit
c9df9d1
1 Parent(s): a5934c8

Change to filepath in audio output

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. utils.py +2 -1
app.py CHANGED
@@ -56,7 +56,7 @@ def populate_metadata(link):
56
  return yt.thumbnail_url, yt.title, audio
57
 
58
  def inference(yt_audio):
59
- with open(yt_audio[1], "rb") as fd:
60
  contents = fd.read()
61
 
62
  audio = upload_audio(contents,sample_rate=SAMPLE_RATE)
 
56
  return yt.thumbnail_url, yt.title, audio
57
 
58
  def inference(yt_audio):
59
+ with open(yt_audio, "rb") as fd:
60
  contents = fd.read()
61
 
62
  audio = upload_audio(contents,sample_rate=SAMPLE_RATE)
utils.py CHANGED
@@ -67,7 +67,8 @@ def sequence_to_pandas_dataframe(sequence):
67
  pd_dict["end_time"].append(note.end_time)
68
  pd_dict["duration"].append(note.end_time - note.start_time)
69
  pd_dict["pitch"].append(note.pitch)
70
-
 
71
  return pd.DataFrame(pd_dict)
72
 
73
  def dataframe_to_pianoroll_img(df):
 
67
  pd_dict["end_time"].append(note.end_time)
68
  pd_dict["duration"].append(note.end_time - note.start_time)
69
  pd_dict["pitch"].append(note.pitch)
70
+ pd_dict['instrument'].append(note.instrument)
71
+
72
  return pd.DataFrame(pd_dict)
73
 
74
  def dataframe_to_pianoroll_img(df):