update API

This commit is contained in:
Maciej Czajka 2023-01-27 21:51:54 +01:00
parent b34f303b02
commit e0db322995

View File

@ -169,7 +169,8 @@ async def recs(production_id: str,
scores += r.get()
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.remove(production_id)
if production_id in scores:
scores.remove(production_id)
return {
'id': scores
}
}