mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 20:12:39 +00:00
[+] Verse: Model inference progress bar
This commit is contained in:
parent
47a508e8a9
commit
e1d33691b4
@ -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…
x
Reference in New Issue
Block a user