change confidence to %
This commit is contained in:
@ -206,7 +206,7 @@ class LyricSearch(FastAPI):
|
||||
logging.debug("Found %s at %s, match for %s!",
|
||||
line, seeked_found_line, data.sub) # REMOVEME: DEBUG
|
||||
break
|
||||
|
||||
|
||||
if not seeked_found_line:
|
||||
return {
|
||||
'failed_seek': True,
|
||||
@ -214,7 +214,7 @@ class LyricSearch(FastAPI):
|
||||
result['lyrics'] = " / ".join(lyric_lines[seeked_found_line:])
|
||||
|
||||
result['lyrics'] = regex.sub(r'(\s/\s|\n)', '<br>', result['lyrics']).strip()
|
||||
result['confidence'] = f'{float(result.get('confidence', 0)):.2f}'
|
||||
result['confidence'] = int(result.get('confidence', 0))
|
||||
result['time'] = f'{float(result['time']):.4f}'
|
||||
if "cached" in result['src']:
|
||||
result['from_cache'] = True
|
||||
|
Reference in New Issue
Block a user