there was an error on line 223
Browse files
app.py
CHANGED
@@ -219,8 +219,7 @@ def get_audio_info(audio_path):
|
|
219 |
with open(audio_path.name) as json_file:
|
220 |
data = json.load(json_file)
|
221 |
#if 'global_prompt' not in data:
|
222 |
-
#return "No tags found. Either the file is not generated by
|
223 |
-
+ V1.2.8a and higher or the tags are corrupted."
|
224 |
global_prompt = str("\nGlobal Prompt: " + (data['global_prompt'] if data['global_prompt'] != "" else "none")) if 'global_prompt' in data else ""
|
225 |
bpm = str("\nBPM: " + data['bpm']) if 'bpm' in data else ""
|
226 |
key = str("\nKey: " + data['key']) if 'key' in data else ""
|
@@ -245,8 +244,7 @@ def get_audio_info(audio_path):
|
|
245 |
version = str("Version: " + data['version']) if 'version' in data else "Version: Unknown"
|
246 |
info = str(version + global_prompt + bpm + key + scale + prompts + duration + overlap + seed + audio_mode + input_length + channel + sr_select + model + custom_model + base_model + decoder + topk + topp + temperature + cfg_coef)
|
247 |
if info == "":
|
248 |
-
return "No tags found. Either the file is not generated by
|
249 |
-
+ V1.2.7 and higher or the tags are corrupted."
|
250 |
return info
|
251 |
else:
|
252 |
return "Only .wav ,.mp4 and .json files are supported"
|
|
|
219 |
with open(audio_path.name) as json_file:
|
220 |
data = json.load(json_file)
|
221 |
#if 'global_prompt' not in data:
|
222 |
+
#return "No tags found. Either the file is not generated by V1.2.8a and higher or the tags are corrupted."
|
|
|
223 |
global_prompt = str("\nGlobal Prompt: " + (data['global_prompt'] if data['global_prompt'] != "" else "none")) if 'global_prompt' in data else ""
|
224 |
bpm = str("\nBPM: " + data['bpm']) if 'bpm' in data else ""
|
225 |
key = str("\nKey: " + data['key']) if 'key' in data else ""
|
|
|
244 |
version = str("Version: " + data['version']) if 'version' in data else "Version: Unknown"
|
245 |
info = str(version + global_prompt + bpm + key + scale + prompts + duration + overlap + seed + audio_mode + input_length + channel + sr_select + model + custom_model + base_model + decoder + topk + topp + temperature + cfg_coef)
|
246 |
if info == "":
|
247 |
+
return "No tags found. Either the file is not generated by V1.2.7 and higher or the tags are corrupted."
|
|
|
248 |
return info
|
249 |
else:
|
250 |
return "Only .wav ,.mp4 and .json files are supported"
|