added label value counts to log
Browse files
utils.py
CHANGED
@@ -124,10 +124,14 @@ def get_ip(request: gr.Request):
|
|
124 |
return ip
|
125 |
|
126 |
|
127 |
-
def get_song(idx, df = df, filenames = filenames):
|
|
|
128 |
row = df.loc[idx]
|
129 |
audio_path = filenames[idx]
|
130 |
state = AudioStateIG(row)
|
|
|
|
|
|
|
131 |
return state, audio_path
|
132 |
|
133 |
def random_cut_length(audio_data, max_length, sample_rate):
|
|
|
124 |
return ip
|
125 |
|
126 |
|
127 |
+
def get_song(idx, df = df, filenames = filenames, indices = indices):
|
128 |
+
|
129 |
row = df.loc[idx]
|
130 |
audio_path = filenames[idx]
|
131 |
state = AudioStateIG(row)
|
132 |
+
|
133 |
+
print(df.loc(indices).label.value_counts())
|
134 |
+
|
135 |
return state, audio_path
|
136 |
|
137 |
def random_cut_length(audio_data, max_length, sample_rate):
|