update API
This commit is contained in:
parent
b34f303b02
commit
e0db322995
1
main.py
1
main.py
@ -169,6 +169,7 @@ async def recs(production_id: str,
|
|||||||
scores += r.get()
|
scores += r.get()
|
||||||
print(f'time elapsed = {time.time() - time_start}')
|
print(f'time elapsed = {time.time() - time_start}')
|
||||||
scores = [idx[0] for idx in sorted(scores, key=lambda x: x[1], reverse=True)[:count + 1]]
|
scores = [idx[0] for idx in sorted(scores, key=lambda x: x[1], reverse=True)[:count + 1]]
|
||||||
|
if production_id in scores:
|
||||||
scores.remove(production_id)
|
scores.remove(production_id)
|
||||||
return {
|
return {
|
||||||
'id': scores
|
'id': scores
|
||||||
|
Loading…
Reference in New Issue
Block a user