From c15e9d6618cc344b566f5f99165e80574d2e268e Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Mon, 29 May 2023 23:30:20 +0200 Subject: [PATCH] feat: fix adding user and anime threshold argument --- midterm/code/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/midterm/code/main.py b/midterm/code/main.py index b937cda7..9cf21904 100644 --- a/midterm/code/main.py +++ b/midterm/code/main.py @@ -3,6 +3,7 @@ Code for preprocessing data and creating model that predicts and recomends anime based on another anime entered by user """ import pandas as pd + import numpy as np import argparse @@ -220,9 +221,9 @@ def handle_arguments(): parser.add_argument('--neighbors', '-n', help='Specify number of nearest neighbors', required=False, default=5) parser.add_argument('--user_threshold', '-ut', help='Specify minimal number of votes required for user to be included in the data, set to -1 for no threshold', - required=False, default=500) + required=False, type=int, default=500) parser.add_argument('--anime_threshold', '-at', help='Specify minimal number of votes required for anime to be included in the data, set to -1 for no threshold', - required=False, default=200) + required=False, type=int, default=200) # Parse the command-line arguments args = parser.parse_args()