This commit is contained in:
2025-01-15 20:17:49 -05:00
parent b2bb724826
commit c09f72803e
7 changed files with 128 additions and 25 deletions

View File

@ -194,6 +194,16 @@ class LyricSearch(FastAPI):
result = result.dict()
result['lyrics'] = regex.sub(r'(\s/\s|\n)', '<br>', result['lyrics']).strip()
result['confidence'] = f'{float(result.get('confidence', 0)):.2f}'
result['time'] = f'{float(result['time']):.4f}'
if "cached" in result['src']:
result['from_cache'] = True
"""
REMOVE BELOW AFTER TESTING IS DONE
"""
# if not data.extra:
# result.pop('src')
return result