@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user