Spaces:
Running
Running
modify app
Browse files- app.py +2 -1
- inference.py +1 -1
app.py
CHANGED
@@ -145,9 +145,10 @@ def perform_ito(input_audio, reference_audio, ito_reference_audio, num_steps, op
|
|
145 |
yield (args.sample_rate, current_output), ito_param_output, result['step'], ito_log, pd.DataFrame(loss_values), all_results
|
146 |
|
147 |
def update_ito_output(all_results, selected_step):
|
148 |
-
print(all_results)
|
149 |
print(selected_step)
|
150 |
selected_result = all_results[selected_step - 1]
|
|
|
151 |
return (args.sample_rate, selected_result['audio']), selected_result['params'], selected_result['log']
|
152 |
|
153 |
|
|
|
145 |
yield (args.sample_rate, current_output), ito_param_output, result['step'], ito_log, pd.DataFrame(loss_values), all_results
|
146 |
|
147 |
def update_ito_output(all_results, selected_step):
|
148 |
+
print(all_results[selected_step - 1])
|
149 |
print(selected_step)
|
150 |
selected_result = all_results[selected_step - 1]
|
151 |
+
print(selected_result['audio'].shape)
|
152 |
return (args.sample_rate, selected_result['audio']), selected_result['params'], selected_result['log']
|
153 |
|
154 |
|
inference.py
CHANGED
@@ -159,7 +159,7 @@ class MasteringStyleTransfer:
|
|
159 |
all_results.append({
|
160 |
'step': step + 1,
|
161 |
'loss': total_loss.item(),
|
162 |
-
'audio': output_audio.detach(),
|
163 |
'params': current_params,
|
164 |
'log': log_entry
|
165 |
})
|
|
|
159 |
all_results.append({
|
160 |
'step': step + 1,
|
161 |
'loss': total_loss.item(),
|
162 |
+
'audio': output_audio.detach().cpu().numpy(),
|
163 |
'params': current_params,
|
164 |
'log': log_entry
|
165 |
})
|