mirror of https://github.com/hykilpikonna/AquaDX
[+] Verse: Model inference progress bar
parent
54eada1a66
commit
30600a5b9c
|
@ -10,6 +10,7 @@ import requests
|
||||||
import scipy.sparse as sp
|
import scipy.sparse as sp
|
||||||
import implicit
|
import implicit
|
||||||
from hypy_utils.logging_utils import setup_logger
|
from hypy_utils.logging_utils import setup_logger
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
BASE_URL = "https://aquadx.net/aqua/api/v2/game"
|
BASE_URL = "https://aquadx.net/aqua/api/v2/game"
|
||||||
BOT_SECRET = "hunter2"
|
BOT_SECRET = "hunter2"
|
||||||
|
@ -40,7 +41,7 @@ def main(game: str):
|
||||||
# Generate recommendations for each user
|
# Generate recommendations for each user
|
||||||
log.info("Generating recommendations...")
|
log.info("Generating recommendations...")
|
||||||
recommendations = {}
|
recommendations = {}
|
||||||
for user_id in range(user_item_matrix.shape[0]): # Loop over all users
|
for user_id in tqdm(list(range(user_item_matrix.shape[0]))): # Loop over all users
|
||||||
rec, prob = model.recommend(user_id, user_item_matrix[user_id], N=20)
|
rec, prob = model.recommend(user_id, user_item_matrix[user_id], N=20)
|
||||||
recommendations[user_id] = [int(item) for item in rec]
|
recommendations[user_id] = [int(item) for item in rec]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue